objective-c - 在 TabBarController 中旋转 Three20 Photo ViewController

标签 objective-c rotation three20

添加Three20 TTPhotoViewController 在一个空的 UIWindow 上旋转非常有效。

但是,当我将 TTPhotoViewControllerUINavigationController 移到 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: 我对 UITabBarControllerUINavigationController 进行了子类化以覆盖 shouldAutorotateToInterfaceOrientation,但它没有帮助。

最佳答案

我通过从 Window 对象中删除 TabBarController 奇怪地解决了我的问题,然后在返回时将 TabBarController 添加到 window 再次。

关于objective-c - 在 TabBarController 中旋转 Three20 Photo ViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7567244/

相关文章:

ios - 尝试启动 MapKit 位置更新而不提示在 ios 9 中使用 objective-c 进行位置授权

javascript - 尝试在 JavaScript Canvas 上沿鼠标指针方向旋转图像?

javascript - 垂直定位文本

iphone - 设备旋转 iPhone

iphone - TTURL请求和发送POST数据

iphone - iOS 应用程序在 appStore 上架后行为发生了变化

objective-c - NSView子View添加到superView后不可见

html - Objective C 使用 NSScanner 从 html 中获取 <body>

iphone - 如何在 iOS 中将 Float64 转换为 NSString

objective-c - 如何在 UITabBarController 中仅为一页添加 TTTableViewDragRefreshDelegate?