Fixing rotation for iphones.

This commit is contained in:
Samuel Clay 2015-09-22 13:25:18 -07:00
parent 667e999535
commit dc9024c03d
5 changed files with 18 additions and 5 deletions

View file

@ -227,7 +227,7 @@
[self layoutFeedDetailScreen];
}
if (self.feedDetailIsVisible) {
[self.storyPageControl reorientPages:fromInterfaceOrientation];
[self.storyPageControl reorientPages];
}
}

View file

@ -218,6 +218,7 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[appDelegate.feedDetailViewController.view endEditing:YES];
}

View file

@ -87,7 +87,7 @@
- (void)resetPages;
- (void)hidePages;
- (void)refreshPages;
- (void)reorientPages:(UIInterfaceOrientation)fromOrientation;
- (void)reorientPages;
- (void)refreshHeaders;
- (void)setStoryFromScroll;
- (void)setStoryFromScroll:(BOOL)force;

View file

@ -319,6 +319,18 @@
[appDelegate.masterContainerViewController transitionFromFeedDetail];
}
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
[self layoutForInterfaceOrientation:orientation];
[self adjustDragBar:orientation];
[self reorientPages];
} completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
}];
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
// CGPoint scrollPosition = CGPointMake(0, scrollPct * currentPage.webView.scrollView.contentSize.height);
@ -436,7 +448,7 @@
// self.scrollView.contentOffset = CGPointMake(self.scrollView.frame.size.width * currentPage.pageIndex, 0);
}
- (void)reorientPages:(UIInterfaceOrientation)fromOrientation {
- (void)reorientPages {
[self applyNewIndex:currentPage.pageIndex-1 pageController:previousPage supressRedraw:YES];
[self applyNewIndex:currentPage.pageIndex+1 pageController:nextPage supressRedraw:YES];
[self applyNewIndex:currentPage.pageIndex pageController:currentPage supressRedraw:YES];

View file

@ -2610,7 +2610,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.newsblur.NewsBlur;
PRODUCT_NAME = NewsBlur;
PROVISIONING_PROFILE = "5ec66721-33a0-4b91-bede-8f2bfad95980";
PROVISIONING_PROFILE = "ca3e3dd7-8eb5-4b4a-93e7-f66666a8cdab";
STRIP_INSTALLED_PRODUCT = NO;
TARGETED_DEVICE_FAMILY = "1,2";
"WARNING_CFLAGS[arch=*]" = "-Wall";
@ -2647,7 +2647,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.newsblur.NewsBlur;
PRODUCT_NAME = NewsBlur;
PROVISIONING_PROFILE = "5ec66721-33a0-4b91-bede-8f2bfad95980";
PROVISIONING_PROFILE = "ca3e3dd7-8eb5-4b4a-93e7-f66666a8cdab";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};