Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我在模式视图存在时尝试旋转 iPad,我的应用程序会崩溃。当模态视图存在时如何停止自动旋转,或者更好的是如何使模态视图与其他所有内容一起旋转(当应用程序崩溃时,所有内容都旋转但模态视图)?非常感谢!
我建议找出崩溃的原因。无论如何,如果您真的想阻止界面旋转,请使用
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
NO如果您当前正在显示模态视图,则返回。
NO