开发者

TTWebController autorotate to landscape

开发者 https://www.devze.com 2023-02-24 04:07 出处:网络
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 respon

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

0

精彩评论

暂无评论...
验证码 换一张
取 消