大佬教程收集整理的这篇文章主要介绍了iphone – iOS 6 – (BOOL)shouldAutorotate没有被调用导航控制器推送viewControllers,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我找到
推动控制器
– (BOOL)shouldAutorotate没有被调用.
和
– (NSUInteger)supportedInterfaceOrientations只被调用一次.
我在xcode的项目摘要(或plist)中正确检查了windows所有方向支持.
我想要调用这些方法,因为有一些uicontrol定位代码,我想以编程方式执行方向更改.
-(BOOL)shouldAutorotate; -(NSUInteger)supportedInterfaceOrientations;
我检查了哪个控制器被推入,因此在导航控制器的以下方法中调用了相应的推控制器的uicontrol定位代码
(NSUInteger)supportedInterfaceOrientations;
http://mobileappdevpage.blogspot.in/2012/11/how-to-use-should-autorotateios-6-with.html
另一种方法是通过创建UINaviagationController类来实现
@interface UINavigationController (autorotation) -(BOOL)shouldAutorotate; -(NSUInteger)supportedInterfaceOrientations;
@implementation UINavigationController (autorotation) -(BOOL)shouldAutorotate { UIInterfaceOrientation interfaceOrientation = [UIApplication sharedApplication].statusBarOrientation; [self.topViewController shouldAutorotate]; return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; } @end
以上是大佬教程为你收集整理的iphone – iOS 6 – (BOOL)shouldAutorotate没有被调用导航控制器推送viewControllers全部内容,希望文章能够帮你解决iphone – iOS 6 – (BOOL)shouldAutorotate没有被调用导航控制器推送viewControllers所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。