TTWebController autorotate to landscape
I can't seem to get my TTWebController
to autorotate. My UITabBar
subclass responds to shouldAutorotateToInterfaceOrientation
on all my views except for my TTWebController
subclass. That class responds itself but doesn't rotate even though I return YES.
This is what my TTWebController
subclass looks like:
http://snipt.org/wpnM
This is what I've been testing in my UITabBar
subclass:
- (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 (interfaceOrient开发者_开发百科ation == UIDeviceOrientationPortrait);
}
// Stefan
精彩评论