iOS 屏幕調用

獲取屏幕尺寸

 CGRect rect=[[UIScreen mainScreen] 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;


發佈了74 篇原創文章 · 獲贊 1 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章