码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 如何获取屏幕大小

时间:2015-07-31 14:35:47      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:

 

 1  
 2     UIScreen *currentScreen = [UIScreen  mainScreen];
 3     
 4     NSLog(@"applicationFrame.size.height = %f",currentScreen.applicationFrame.size.height);
 5     
 6     NSLog(@"applicationFrame.size.width = %f",currentScreen.applicationFrame.size.width);
 7     
 8     NSLog(@"applicationFrame.origin.x = %f",currentScreen.applicationFrame.origin.x);
 9     
10     NSLog(@"applicationFrame.origin.y = %f",currentScreen.applicationFrame.origin.y);
11     
12     NSLog(@"bounds.x = %f",currentScreen.bounds.origin.x);
13     
14     NSLog(@"bounds.y = %f",currentScreen.bounds.origin.y);
15     
16     NSLog(@"bounds.height = %f",currentScreen.bounds.size.height);
17     
18     NSLog(@"bounds.width = %f",currentScreen.bounds.size.width);
19     
20     NSLog(@"brightness = %f",currentScreen.brightness);

 

iOS 如何获取屏幕大小

标签:

原文地址:http://www.cnblogs.com/jukaiit/p/4691944.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!