iOS 锁屏强制切换屏幕的方向
来源:互联网 发布:氧气听书软件电脑版 编辑:程序博客网 时间:2024/06/05 04:11
//根据业务需求在屏幕锁定的情况下,设置屏幕的方向,只测了IOS8.1系统
if([[UIDevice currentDevice]respondsToSelector:@selector(setOrientation:)]) {
[[UIDevicecurrentDevice]performSelector:@selector(setOrientation:)
withObject:(id)UIInterfaceOrientationLandscapeRight];
}
if ([[UIApplication sharedApplication] respondsToSelector:@selector(setStatusBarOrientation:)]) {
[[UIApplicationsharedApplication]setStatusBarOrientation:UIInterfaceOrientationLandscapeRightanimated:YES];
}
//旋转屏幕时触发的函数:
//旋转方向发生改变时
-(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转动画前一半发生之前自动调用
-(void)willAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转动画后一半发生之前自动调用
-(void)willAnimateSecondHalfOfRotationFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转之前自动调用
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
}
//视图旋转完成之后自动调用
-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
}
//视图旋转动画前一半发生之后自动调用
-(void)didAnimateFirstHalfOfRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
}
- iOS 锁屏强制切换屏幕的方向
- IOS强制屏幕横竖屏相互切换
- iOS android 下强制改变屏幕方向
- ios 强制改变某一页面屏幕方向
- IOS强制横竖屏幕切换总结续
- iOS--关于屏幕的方向
- Android--切换屏幕方向
- IOS强制横竖屏切换
- android:screenOrientation 强制屏幕方向
- android:screenOrientation 强制屏幕方向
- Android 强制获取屏幕方向
- iOS开发 强制竖屏。系统KVO 强制竖屏—>适用于支持各种方向屏幕启动时,竖屏展示广告
- iOS两个强制旋转屏幕的方法
- iOS两个强制旋转屏幕的方法
- iOS两个强制旋转屏幕的方法
- iOS两个强制旋转屏幕的方法
- iOS两个强制旋转屏幕的方法
- 关于iOS横竖屏幕强制转换的问题[强制横屏]
- Java标准流输入输出流In(Out)putStream,ReaderWriter等总结(1)
- poj 3744 概率dp 矩阵快速幂优化
- C语言指针函数和函数指针详细介绍
- Basic Calculator II
- 金额转换,阿拉伯数字的金额转换成中国传统的形式如:(¥1011)->(一 千零一拾一元整)输出
- iOS 锁屏强制切换屏幕的方向
- POJ_3414_Pots
- MySQL之Master-Master配置
- 【剑指Offer面试题】 九度OJ1522:包含min函数的栈
- 三种线性排序算法(计数、基数、桶排序)的简单实现
- R语言:初试logitstic
- boost库之shared_ptr库,智能指针
- 递归计算N阶乘
- Angular新手容易碰到的坑,随时更新,欢迎订阅