There are cases that did rotate method (didRotateFromInterfaceOrientation:) of a view controller is not triggered. A workaround is to manually call it from you main view controller, but if you don't have time, an easier fix is to use notifications:
Place the above in your controllers view will appear, and don't forget to unregister it in view did disappear.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:) name:UIDeviceOrientationDidChangeNotification object:nil];
Place the above in your controllers view will appear, and don't forget to unregister it in view did disappear.
- (void)didRotate:(NSNotification *)notification { //do your post-rotation logic here }
Thanks Dear its very help full in the case of ios 6 rotation
ReplyDeleteonce again thank you very much
Very helpful - thanks!
ReplyDeleteGreat reading your postt
ReplyDelete