Objective c iOS、方向更改在iOS 5中触发,但在iOS 6中不触发
我有一个应用程序,它使用presentViewController以模式显示UIWebview。 现在,根视图支持方向更改并相应地旋转。我侦听事件UIApplicationWillChangeStatusBarOrientationNotification 现在,我使用“ 我拒绝使用Objective c iOS、方向更改在iOS 5中触发,但在iOS 6中不触发,objective-c,ios5,ios6,Objective C,Ios5,Ios6,我有一个应用程序,它使用presentViewController以模式显示UIWebview。 现在,根视图支持方向更改并相应地旋转。我侦听事件UIApplicationWillChangeStatusBarOrientationNotification 现在,我使用“ 我拒绝使用 dismissModalViewControllerAnimated:YES]; 现在谈谈这个问题: 在iOS 6中,这可以正常工作,并且模式窗口以其父窗口所在的任何方向显示 在i
dismissModalViewControllerAnimated:YES];
现在谈谈这个问题:
在iOS 6中,这可以正常工作,并且模式窗口以其父窗口所在的任何方向显示
在iOS 5中,presentViewController或DismissModalViewController强制抛出
UIApplicationWillChangeStatusBarOrientationNotification
想知道为什么吗?尝试使用此定向通知:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification object:[UIDevice currentDevice]];
请尝试改用此方向通知:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:)
name:UIDeviceOrientationDidChangeNotification object:[UIDevice currentDevice]];
我已经在响应UIApplicationWillChangeStatusBarOrientationNotification。另外,我尝试订阅该通知,但仍然没有解决问题!!我已经在响应UIApplicationWillChangeStatusBarOrientationNotification。另外,我尝试订阅该通知,仍然没有解决问题!!