在我的应用程序中,我有一个tabbarController
和5个由它管理的视图控制器。
我只想让一个UIView
旋转到横向,并在旋转到横向时使标签栏不可见。在目前的情况下,我的所有观点都会自我调整,这不是我所期望的。
我不希望它旋转的UIView
代码是:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (UIInterfaceOrientationLandscapeLeft) {
// stop the rotation, keep it as portrait orientation
// from app document, it says for UITabbarController, rootview which is uitabbarcontroller and views managed by it should all agree on the same orientation otherwise they wont rotate.
// how can i do this?
}
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}