iOS横屏问题
来源:互联网 发布:realtime pcr 数据分析 编辑:程序博客网 时间:2024/06/06 15:01
首先解决横屏问题
1.工程设置只支持竖屏
2.AppDelegate的window设置支持所有
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{ return UIInterfaceOrientationMaskAll;}
3.UINavigationController或者BaseViewController只支持竖屏
(这样保证了应用程序支持横屏,而且平常的vc是竖屏,然后要横屏的vc present出来)
- (BOOL)shouldAutorotate{ return YES;}- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskPortrait;}
4.播放器界面present出来,支持横竖屏
-(BOOL)shouldAutorotate{ return YES;}
- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskAll;}
播放器界面present出来,支持横屏
-(BOOL)shouldAutorotate{ return YES;}
- (NSUInteger)supportedInterfaceOrientations{ return UIInterfaceOrientationMaskLandscape;}
//状态栏设置ios7.0以上
-(void)playerViewDelegateSetStatusBarHiden:(BOOL)is_hiden{ self.stauts_bar_hiden = is_hiden; [self prefersStatusBarHidden]; //隐藏还是显示 //更新statusbar [self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)]; //刷新状态栏}- (BOOL)prefersStatusBarHidden{ return self.stauts_bar_hiden;}
0 0
- iOS横屏问题
- iOS 横屏遇到的问题
- iOS 各种设备 plus 横屏问题。
- iOS开发中的横屏问题
- ios横竖屏问题
- ios 转屏问题
- iOS横竖屏问题
- 横竖屏切换问题ios
- iOS横竖屏转换问题
- iOS横竖屏的问题
- iOS关于横屏window坐标的问题
- iOS 8.3 ios9 横屏弹出alertview 崩溃问题
- IOS 横屏状态栏不显示的问题
- [iOS]关于iOS中界面视图横屏/竖屏切换的问题总结
- iOS问题
- iOS问题
- iOS问题
- iOS问题
- HDU 4408 - Minimum Spanning Tree(最小生成树计数)
- Scala学习笔记15【Scala文件操作】
- 详解 /etc/inittab 文件
- 欢迎使用CSDN-markdown编辑器
- Android Studio配置CheckStyle
- iOS横屏问题
- 性能测试进行的时间
- Phabricator实践
- winusb for ubuntu14.04
- 功能测试
- Qt绘图插件QCustomPlot配置、使用
- 点击webView中链接,开系统safari,不在webView里面跳转
- tomcat集群负载均衡配置
- Asp.net SQL注入实例分享