开发者

UIStatusbar changes orientation, but everything else stays the same

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

UIStatusbar changes orientation, but everything else stays the same


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜