添加Three20 TTPhotoViewController 在一个空的 UIWindow
上旋转非常有效。
但是,当我将 TTPhotoViewController 从 UINavigationController
移到 UITabBarController
中时,它根本不会旋转。
我确保为每个 shouldAutorotateToInterfaceOrientation
函数返回 YES。
Three20 Photo Gallery 是否在 UITabBarController 侧边旋转工作?
我该怎么做?
[[TTURLRequestQueue mainQueue] setMaxContentLength:0];
TTNavigator *navigator = [TTNavigator navigator];
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
navigator.window = [UIApplication sharedApplication].keyWindow;
TTURLMap *map = navigator.URLMap;
[map from:@"tt://appPhotos" toSharedViewController:[PhotoViewController class]];
[navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://appPhotos"]];
更新 1: 阅读一些帖子后,我现在只能在
TTScrollView
中旋转图像,但导航栏不会旋转。
更新 2:
我对 UITabBarController
和 UINavigationController
进行了子类化以覆盖 shouldAutorotateToInterfaceOrientation
,但它没有帮助。
最佳答案
我通过从 Window
对象中删除 TabBarController
奇怪地解决了我的问题,然后在返回时将 TabBarController
添加到 window
再次。
关于objective-c - 在 TabBarController 中旋转 Three20 Photo ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7567244/