获取状态栏的尺寸
CGRect rect;
rect=[[UIApplication sharedApplication]statusBarFrame];
获取屏幕尺寸
rect=[[UIScreen mainScreen]bounds];
CGSize size=rect.size;
CGFloat width=size.width;
CGFloat height=size.height;
NSLog(@"%f",width);
NSLog(@"%f",height);
2023-10-28 13:21:34
获取状态栏的尺寸
CGRect rect;
rect=[[UIApplication sharedApplication]statusBarFrame];
获取屏幕尺寸
rect=[[UIScreen mainScreen]bounds];
CGSize size=rect.size;
CGFloat width=size.width;
CGFloat height=size.height;
NSLog(@"%f",width);
NSLog(@"%f",height);