App size, remove status bar
CGRect r = [UIScreen mainscreen].applicationframe;
This size does not swap wide with the screen rotation, but when the screen rotates, the height of the status bar will be automatically modified to remove the high.
Vertical screen (4 inch): X=0, Y=20, width=320, height=548
Horizontal screen (4 inch): X=0,y=0, width=300, height=568
Screen size
CGRect rx = [UIScreen mainscreen].bounds;
(4 inch) rx=x=0, y=0, width=320, height=568
Fixed size, does not change with screen rotation
Status bar Size
CGRect rect;
rect = [[UIApplication sharedapplication] statusbarframe];
Always vertical to height.
Vertical screen (4 inch): X=0, Y=0, width=320, height=20
Horizontal screen (4 inch): x=300, Y=0, width=20, height=568
How to get screen resolution in iphone
CGRect rect = [[UIScreen mainscreen] bounds];
Cgsize size = rect.size;
CGFloat width = size.width;
CGFloat height = size.height;
Also, when designing the UI, pay attention to the user's smallest touch area. There are 2 ways to say
44*44 seems to be from the SDK.
64*64 from Standford Handouts
iOS screen, status bar (statusbar), program window size gain and screen rotation size change