ios的旋屏控制技巧

在iOS5.1 和 之前的版本中, 我们通常利用 shouldAutorotateToInterfaceOrientation: 来单独控制某个UIViewController的旋屏方向支持,比如:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

以后直接在工程的plist文件中添加Supported interface orientations选项,添加item0 设置值为Portrait 即可
如图

你可能感兴趣的:(ios的旋屏控制技巧)