ios 开发如何限制仅显示竖屏,取消横屏.
1、从Xcode找到 General -> Deployment Info -> Device Orientation;如图:

2、只留下第一个勾选,如图:

3、找到工程的info.plist 文件,找到: Supported interface orientations (iPad)如图:

4、删除不需要的显示方向,重新运行程序,结果OK.如图:


1、从Xcode找到 General -> Deployment Info -> Device Orientation;如图:
2、只留下第一个勾选,如图:
3、找到工程的info.plist 文件,找到: Supported interface orientations (iPad)如图:
4、删除不需要的显示方向,重新运行程序,结果OK.如图: