I have a tabBarController which contain two tab, i would like 1 tab is support orientation but another one not,how to do that? i have tried the code:
@implementation UITabBarController (CustomTabbar)
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if(self.tabBarController.selectedIndex==1){
NSLog(@"rotate"); return YES;
} else {
NSLog(@"no rotate"); return NO;
}
} @end
but after i rotating the view2 to landscape mode and back to view1, view1 become landscape as well until i rotate it back to potrait,but the thing i need is view1 always remain potrait when it appear,can help?
Regards,
sathish