I have a tabbar app, with some uinavigationcontrollers.
In every VC i have:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
But for some reason when rotating the screen the status bar rotates, but开发者_StackOverflow社区 the rest of my view stays the same. How can I fix this?
Try adding this to your info.plist
shouldAutorotateToInterfaceOrientation:
would normally be implemented like this (for an iPhone app that supports rotation):
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
It's not clear from your question whether you want the subviews to rotate or the status bar to not rotate.
精彩评论