iOS,orientationchanges,在iOS 5中触发,但在iOS中未触发6
问题描述:
我有一个应用程序,它使用presentViewController以模态方式呈现UIWebview。 现在,根视图支持方向更改并相应旋转。我收听UIApplicationWillChangeStatusBarOrientationNotification事件。iOS,orientationchanges,在iOS 5中触发,但在iOS中未触发6
现在我目前使用“
presentViewController:navController
animated:YES
completion:nil];
我解雇使用
dismissModalViewControllerAnimated:YES];
现在对这个问题的模态窗口: 在iOS 6中,能正常工作和模态窗口在任何显示出来它的父母的方向。
在iOS 5中,presentViewController或dismissModalViewControllerAnimated强行抛出
UIApplicationWillChangeStatusBarOrientationNotification !!
任何想法为什么?
答
尝试使用这种取向通知代替:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification object:[UIDevice currentDevice]];
我已经回应UIApplicationWillChangeStatusBarOrientationNotification。 – Huang 2013-02-26 18:18:22
加我试着订阅通知,仍然没有解决问题! – Huang 2013-02-26 18:33:03