ios的旋屏控制技巧

来源:互联网 发布:axure chrome插件 mac 编辑:程序博客网 时间:2024/04/30 12:01

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

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{    return (interfaceOrientation == UIInterfaceOrientationPortrait);}
以后直接在工程的plist文件中添加Supported interface orientations选项,添加item0 设置值为Portrait 即可
如图
0 0
原创粉丝点击