获取IOS屏幕尺寸大小

转自:http://www.open-open.com/lib/view/open1395752090322.html

1.app尺寸,去掉状态栏

CGRect r = [ UIScreen mainScreen ].applicationFrame;

r=0,20,320,460

2.屏幕尺寸

CGRect rx = [ UIScreen mainScreen ].bounds;

r=0,0,320,480

 3.状态栏尺寸

   CGRect rect; rect = [[UIApplication sharedApplication] statusBarFrame];

4.iphone中获取屏幕分辨率的方法

CGRect rect = [[UIScreen mainScreen] bounds];

CGSize size = rect.size;

CGFloat width = size.width;

CGFloat height = size.height;

posted on 2014-10-13 13:34  王培  阅读(366)  评论(0编辑  收藏  举报

导航