- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}
本文介绍了一个iOS应用程序中限制界面方向为竖屏的方法。通过在应用程序代理中实现supportedInterfaceOrientationsForWindow方法并返回UIInterfaceOrientationMaskPortrait,可以确保应用程序在运行时仅支持竖屏显示。
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait;
}
转载于:https://www.cnblogs.com/Ewenblog/p/3884452.html
924

被折叠的 条评论
为什么被折叠?