现在,除了更多导航控制器及其子视图控制器之外,所有选项卡都可以使用方向.我知道问题是设备旋转通知没有传递给tab栏控制器中morenavigationcontroller里面的子视图控制器.
此外,更多的navigationcontroller是Readonly属性.
我的问题是我想在morenavigationcontroller和子视图控制器中支持所有方向.现在shoulautorotate内部的子视图控制器没有被调用更多导航控制器.
解决方法 在iOS 6之后,Apple改变了应用程序中的方向.请看下面的帖子.这是非常有帮助的Tabbar controller with navigationcontrollers orientation ios 6
或者,您可以创建自定义tabbarcontroller并实现以下方法
-(BOol)shouldautorotatetoInterfaceOrIEntation:(UIInterfaceOrIEntation)interfaceOrIEntation{ // You do not need this method if you are not supporting earlIEr iOS Versions return [self.selectedVIEwController shouldautorotatetoInterfaceOrIEntation:interfaceOrIEntation];}-(NSUInteger)supportedInterfaceOrIEntations{ return [self.selectedVIEwController supportedInterfaceOrIEntations];}-(BOol)shouldautorotate{ return YES;}总结
以上是内存溢出为你收集整理的rotation – 支持tabbarcontroller iOS 6中morenavigationcontroller和children viewcontroller中的所有方向全部内容,希望文章能够帮你解决rotation – 支持tabbarcontroller iOS 6中morenavigationcontroller和children viewcontroller中的所有方向所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)