TTWeb控制器自动旋转到横向

时间:2011-04-10 18:25:45

标签: iphone ios three20 autorotate

我似乎无法让我的TTWebController自动旋转。除了我的UITabBar子类之外,我的shouldAutorotateToInterfaceOrientation子类对我的所有视图都响应TTWebController。即使我返回YES,该类也会响应但不会旋转。

这是我的TTWebController子类的样子:

http://snipt.org/wpnM

这就是我在UITabBar子类中测试的内容:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
NSLog(@"shouldAutorotateToInterfaceOrientation: %@", [[TTNavigator navigator] visibleViewController]);
if ([[[TTNavigator navigator] visibleViewController] isKindOfClass:[TTWebController class]]) {
    return YES;
}

// if you're in the "more..." tab and the topViewController is a TTWebController
// Note: this is required because of a Three20 bug where [[TTNavigator navigator] visibleViewController]
// doesn't work properly if you're in the "more..." tab
if ([self.moreNavigationController.topViewController isKindOfClass:[TTWebController class]]) {
    return YES;
}

// Still here? Return YES only if portrait
return (interfaceOrientation == UIDeviceOrientationPortrait);
}

// Stefan

0 个答案:

没有答案