0
votes

My app is navigation based one. I have extended UINavigationController and have implementations of the below methods in NavigationController and individual ViewControllers also.

-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration -(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

When the orientation change happens In iOS 7, First Rotation method from Navigation controller gets called then the same method from Actual viewcontroller gets called. I badly need this.

In case of iOS8 only Rotation method from Viewcontroller gets called not the Navigation controllers one.

Note: I m not using any ios 8 specific orientation method also. As i have change so many things.So please don't suggest me to implement the below - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id )coordinator

1
It has been deprecated in iOS8 in favor of -viewWillTransitionToSize:withTransitionCoordinator:Nerkatel

1 Answers

-1
votes

That method is deprecrated from ios 8

Sent to the view controller before performing a one-step user interface rotation.

Use viewWillTransitionToSize:withTransitionCoordinator: to make interface-based adjustments.

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
                                         duration:(NSTimeInterval)duration

Also note that by the time we recevice this notification the view is already change to its new orientation.

For more reference https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/index.html#//apple_ref/occ/instm/UIViewController/willAnimateRotationToInterfaceOrientation:duration: