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:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if(self.tabBarController.selectedIndex==1){
NSLog(@"rotate");
return YES;
}
else{
NSLog(@"no rotate");
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
} 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?