gpt4 book ai didi

iphone - 在 View Controller -> Tab Bar Controller -> Navigation Controller -> View Controller 层次结构中旋转 View Controller

转载 作者:行者123 更新时间:2023-11-28 19:20:51 27 4
gpt4 key购买 nike

我的应用程序的 View Controller 层次结构设置如下:

UIViewController
|
UITabBarController
|
UINavigationController
| |
| UIViewController (*)
|
UINavigationController
|
UIViewController (*)

为什么我的 UIViewController (*) 没有获取 (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 方法?

当我的应用程序具有如下设置的 View Controller 层次结构时:

UITabBarController
|
UINavigationController
| |
| UIViewController (*)
|
UINavigationController
|
UIViewController (*)

UIViewController (*) get (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 方法。

最佳答案

这是一个 View Controller 包含问题。如果你的目标是 iOS 5,你可以使用 new UIViewController methods for containment (请参阅管理 subview Controller )。否则,您需要将旋转消息从根 UIViewController 转发到 UITabBarViewController

关于iphone - 在 View Controller -> Tab Bar Controller -> Navigation Controller -> View Controller 层次结构中旋转 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8975950/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com