1 2 uiscreen *currentscreen = [UIScreen mainscreen]; 3 4 NSLog (@ "applicationFrame.size.height = %f ", currentScreen.applicationFrame.size.height); 5 6 NSLog (@ "applicationFrame.size.width =%f", currentScreen.applicationFrame.size.width); 7 8 NSLog (@ "applicationframe.origin.x =%f", currentscreen.applicationframe.origin.x); 9 NSLog (@ "APPLICATIONFRAME.ORIGIN.Y =%f", CURRENTSCREEN.APPLICATIONFRAME.ORIGIN.Y); NSLog (@ "bounds.x =%f", currentscreen.bounds.origin.x), NSLog (@ "bounds.y =%f", CURRENTSCREEN.BOUNDS.ORIGIN.Y); NSLog (@ "bounds.height =%f", currentScreen.bounds.size.height); 17 - NSLog (@ "bounds.width =%f", currentScreen.bounds.size.width), NSLog (@ "brightness =%f", currentscreen.brightness);
Update:
After IOS 9: use [UIScreen mainscreen].bounds instead of [UIScreen mainscreen].applicationframe
How IOS gets the screen size