iOS转屏
来源:互联网 发布:d3.v3.min.js引用 编辑:程序博客网 时间:2024/05/01 05:08
iOS7中
不支持转屏:
-(BOOL)shouldAutorotate
{
return NO;
}
iOS5/6中,不支持转屏:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return interfaceOrientation == UIInterfaceOrientationPortrait;
}
-(BOOL)shouldAutorotate
{
return NO;
}
另外,有导航栏时,须重写
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return interfaceOrientation == UIInterfaceOrientationPortrait;
}
-(BOOL)shouldAutorotate
{
return NO;
}
0 0