判断手机屏幕旋转方向
来源:互联网 发布:服务端数据为空淘宝 编辑:程序博客网 时间:2024/05/17 09:03
简书地址
判断手机屏幕旋转方向
- (void)viewDidLoad{ [super viewDidLoad]; //设备旋转通知 [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleDeviceOrientationDidChange:) name:UIDeviceOrientationDidChangeNotification object:nil ];}- (void)handleDeviceOrientationDidChange:(UIInterfaceOrientation)interfaceOrientation{ UIDevice *device = [UIDevice currentDevice] ; switch (device.orientation) { case UIDeviceOrientationFaceUp: NSLog(@"屏幕朝上平躺"); break; case UIDeviceOrientationFaceDown: NSLog(@"屏幕朝下平躺"); break; case UIDeviceOrientationUnknown: NSLog(@"未知方向"); break; case UIDeviceOrientationLandscapeLeft: NSLog(@"home键在右"); break; case UIDeviceOrientationLandscapeRight: NSLog(@"home键在左"); break; case UIDeviceOrientationPortrait: NSLog(@"home键在下"); break; case UIDeviceOrientationPortraitUpsideDown: NSLog(@"home键在上"); break; default: NSLog(@"无法辨识"); break; }}
0 0
- 判断手机屏幕旋转方向
- IOS - 判断手机屏幕旋转
- 判断手机屏幕是否旋转
- android获取手机屏幕尺寸和旋转方向
- 判断android手机屏幕方向的方法
- Opengles之glRotatef()旋转方向判断
- iOS判断当前设备旋转方向
- Android动态控制手机屏幕方向
- Android手机屏幕的方向
- 手机屏幕旋转180度
- 检测手机屏幕的旋转
- iPhone屏幕旋转锁定时判断设备的方向
- UIDeviceOrientation判断当前机器硬件的旋转方向
- ios开发屏幕旋转锁定时判断设备的方向
- Android入门笔记之更改手机屏幕方向
- js监听手机屏幕亮度、震动、方向变化
- iphone 方向旋转
- tabbar的旋转方向
- 输入一个整形数组,数组里有正数也有负数。数组中连续的一个或多个整数组成一个子数组,每个 子数组都有一个和。求所有子数组的和的最大值。要求时间复杂度为O(n)。
- FZU Problem 2214 Knapsack problem(01背包,超大背包)——第六届福建省大学生程序设计竞赛-重现赛
- 【Dev Club分享】基于RxJava的一种MVP实现
- C++内存管理
- CSS学习笔记之class选择器
- 判断手机屏幕旋转方向
- 史上最详细的Android Studio系列教程四--Gradle基础
- HDOJ 5745 La Vie en rose DP+bitset
- 【最详细的Web前端入门视频】小腿基础教学
- Java图像灰度化的实现过程解析
- 可信前端之路-代码保护
- 破坏掉数据文件后仍然可以查询,且表空间无法删除
- Activity启动流程分析(基于android 5.1)
- C#/mono开发Android应用程序入门(二)-第一个应用程序(Hello World)(转)