iOS 屏幕调用

来源:互联网 发布:工资结算软件 编辑:程序博客网 时间:2024/06/03 21:04

获取屏幕尺寸

 CGRect rect=[[UIScreenmainScreen] bounds];  //全屏的

获取当前剪切区尺寸

CGContextRef idevice;

CGRect boudsc=CGContextGetClipBoundingBox(idevice);

int cleft = boudsc.origin.x;

int ctop = boudsc.origin.y;

int cwidth = boudsc.size.width;

int cheight = boudsc.size.height;


原创粉丝点击