IOS -> get screen size

app size, remove the status bar

CGRect r = [ UIScreen mainScreen ].applicationFrame;

r=0,20,320,460

screen size

CGRect rx = [ UIScreen mainScreen ].bounds;

r=0,0,320,480

Status bar size

CGRect rect; rect = [[UIApplication sharedApplication] statusBarFrame];

How to get screen resolution in iphone

CGRect rect = [[UIScreen mainScreen] bounds];
CGSize size = rect.size;
CGFloat width = size.width;
CGFloat height = size.height;

In addition, when designing the UI, pay attention to the smallest touch area for the user. There are 2 theories 

44*44 seems to be from sdk

64*64 from standford handout

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326814570&siteId=291194637