CGRect frame = [[UIScreen mainScreen] bounds];
NSLog(@"frame :%@",frame);
这样输入是null
NSLog(@"frame :%f",frame.size.width); 这样有值
[[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height
屏幕的宽和高
2023-08-05 14:22:40
CGRect frame = [[UIScreen mainScreen] bounds];
NSLog(@"frame :%@",frame);
这样输入是null
NSLog(@"frame :%f",frame.size.width); 这样有值
[[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height
屏幕的宽和高