iOS: fixed #913 (iPad layout issue with landscape)

This commit is contained in:
David Sinclair 2016-05-10 21:47:18 -07:00
parent ab89601156
commit fb03d62610

View file

@ -213,19 +213,12 @@
leftBorder.hidden = NO;
}
if (!self.feedDetailIsVisible) {
[self layoutDashboardScreen];
} else if (!self.originalViewIsVisible) {
[self layoutFeedDetailScreen];
}
[self adjustLayout];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
// leftBorder.frame = CGRectMake(0, 0, 1, CGRectGetHeight(self.view.bounds));
if (!self.feedDetailIsVisible) {
[self layoutDashboardScreen];
} else if (!self.originalViewIsVisible) {
[self layoutFeedDetailScreen];
}
[self adjustLayout];
if (self.feedDetailIsVisible) {
// Defer this in the background, to avoid misaligning the detail views
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
@ -241,6 +234,18 @@
}];
}
- (void)adjustLayout {
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
return;
}
if (!self.feedDetailIsVisible) {
[self layoutDashboardScreen];
} else if (!self.originalViewIsVisible) {
[self layoutFeedDetailScreen];
}
}
- (void)delayedReorientPages {
[self.storyPageControl reorientPages];
[[UIApplication sharedApplication] endBackgroundTask:self.reorientBackgroundTask];