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

IOS中获取屏幕尺寸

时间:2015-03-07 23:58:01      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:

    

    //app尺寸,去掉状态栏

    CGRect appRect = [UIScreen mainScreen].applicationFrame;

    NSLog(@"%f, %f, %f,%f",appRect.origin.x, appRect.origin.y, appRect.size.width,appRect.size.height);

    

    //屏幕尺寸

    CGRect screenRect = [UIScreen mainScreen].bounds;

    NSLog(@"%f, %f, %f,%f",screenRect.origin.x, screenRect.origin.y, screenRect.size.width,screenRect.size.height);

    

    //装天栏尺寸

    CGRect statusRect = [[UIApplication sharedApplication] statusBarFrame];

    NSLog(@"%f, %f, %f,%f",statusRect.origin.x, statusRect.origin.y, statusRect.size.width,statusRect.size.height);

IOS中获取屏幕尺寸

标签:

原文地址:http://www.cnblogs.com/123qw/p/4321085.html

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