iphone - willRotateToInterfaceOrientation 未被调用

标签 iphone uiview uiviewcontroller rotation

我在 View Controller 的 shouldAutorotateToInterfaceOrientation 函数中返回 YES,并且我可以使用断点看到返回 YES,但是willRotateToInterfaceOrientation 方法没有被调用,也没有任何其他旋转方法。返回 YES 后似乎没有任何反应!

有什么想法吗?

迈克

最佳答案

这个 View viewController 是不是导航 Controller 的其他 Root View Controller 的 subview 吗?如果是这样,那么调用不会传播到 subview Controller ,因此这可能就是您的 View 不旋转的原因。

关于iphone - willRotateToInterfaceOrientation 未被调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1516268/

相关文章:

iphone - UIDatePicker 和一个 UITableView

iphone - 有没有办法替换已经定义的预处理器标识符?

ios - 如何设置 SKScene 的背景图片?

ios - 子类化作为聊天室的 UIViewController 以重用

IOS:使用模态 ViewController 进行转换

iphone - 在 Interface Builder UIImageView 中从 Xcode "Folder Reference"访问图像

iphone - Ionic 和 sails.js(后端)测试

ios - 如何在子类化 View 时减少代码冗余?

iphone - CGAffineTranformRotate atan2 不准确

ios - UIViewController里面CollectionViewCell内存问题