iPhone program
How to handle auto rotation in UITabBarViewController based application
For TabView based application, there is many case that some of the view can be in landscape mode while other can't. In some cases, it is even complicated that one of the view in tab bar is navigation based and the view can only be in landscape mode after it is pushed to some view.
To handle this, it is very simple. Subclass you UITabBarViewController and overload this function:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return [self.selectedViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}
Submitted by water on Sat, 2010-01-23 13:46

Recent comments
18 weeks 4 days ago
23 weeks 6 days ago
27 weeks 2 days ago
28 weeks 2 days ago
37 weeks 18 hours ago
37 weeks 18 hours ago
37 weeks 1 day ago
37 weeks 3 days ago
39 weeks 1 day ago
39 weeks 2 days ago