willRotateToInterfaceOrientation未被调用 [英] willRotateToInterfaceOrientation not being called

查看:143
本文介绍了willRotateToInterfaceOrientation未被调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在视图控制器的 shouldAutorotateToInterfaceOrientation 函数中返回 YES ,我可以看到使用<$的断点正在返回c $ c> YES ,但是没有调用 willRotateToInterfaceOrientation 方法,也没有任何其他旋转方法。似乎在返回 YES 没有任何反应!

I'm returning YES in my view controller's shouldAutorotateToInterfaceOrientation function, and I can see using breakpoints that YES is being returned, however the willRotateToInterfaceOrientation method isn't being called, and nor is any other rotating method. It seems like after returning YES nothing happens!

任何想法?

Mike

推荐答案

这是否将viewController视为某个其他根视图控制器的子视图,而不是导航控制器?如果是这样,那么调用不会传播到子视图控制器,这可能就是你的视图不旋转的原因。

Is this views viewController a subview of some other root view controller thats not a navigation controller? if so then the call does not propagate to the subviews controller, so that might be why your view isnt rotating.

这篇关于willRotateToInterfaceOrientation未被调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆