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
屏幕的宽和高
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
屏幕的宽和高