ios viewcontroller 怎么获取实际屏幕宽高
1个回答
展开全部
app尺寸,去掉状态栏
CGRect r = [ UIScreen mainScreen ].applicationFrame;
r=0,20,320,460
屏幕尺寸
CGRect rx = [ UIScreen mainScreen ].bounds;
r=0,0,320,480
状态栏尺寸
CGRect rect; rect = [[UIApplication sharedApplication] statusBarFrame];
iphone中获取屏幕分辨率的方法
CGRect rect = [[UIScreen mainScreen] bounds];
CGSize size = rect.size;
CGFloat width = size.width;
CGFloat height = size.height;
我是这样开发,你试试吧
CGRect r = [ UIScreen mainScreen ].applicationFrame;
r=0,20,320,460
屏幕尺寸
CGRect rx = [ UIScreen mainScreen ].bounds;
r=0,0,320,480
状态栏尺寸
CGRect rect; rect = [[UIApplication sharedApplication] statusBarFrame];
iphone中获取屏幕分辨率的方法
CGRect rect = [[UIScreen mainScreen] bounds];
CGSize size = rect.size;
CGFloat width = size.width;
CGFloat height = size.height;
我是这样开发,你试试吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询