The presented view controller from a custom modal view is not autorotated in iOS7 - (BOOL) shouldAutorotate is not being called properly
I have a view controller that I present using a custom modal presentation
myViewController.modalPresentationStyle = UIModalPresentationCustom;
myViewController.transitioningDelegate = self;
[self presentViewController:myViewController animated:YES completion:nil];
Works as expected, but for some reason (in iOS7) the presented view controller is not autorotated when the device orientation changes. Apparently the method (represented by the view controller):
- (BOOL)shouldAutorotate {
return YES;
}
not called in iOS7 when the device orientation changes. It is called only once when it is first shown. When I run it on iOS8 it works fine and shouldAutorotate gets called as expected. This is weird because he can only be imagined in Portrait. If I try to render the view in landscape it doesn't work. I have checked all my parent view controllers and they are all set up correctly and I have all the orientations set in my plist mode and my delegates. Does any body have any ideas as to why this works in iOS8 but not iOS7?
source to share
No one has answered this question yet
Check out similar questions: