IOS某个ViewController禁止自动旋转

时间:2014-08-15 19:19:09   收藏:0   阅读:495

IOS屏幕自动旋转,强制横竖屏方法:

bubuko.com,布布扣
- (BOOL)shouldAutorotate
{
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations
{
    return (UIInterfaceOrientationMaskAll);// 修改这里 控制显示方向
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
bubuko.com,布布扣

IOS某个ViewController禁止自动旋转,布布扣,bubuko.com

原文:http://www.cnblogs.com/yangmx/p/3915328.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!