Xcode Dimensions Of The Screen In iOS

To get the dimensions of the iPhone or iPad screen you can do the following in xcode:

CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
Posted in Mac, Tips and Tricks Tagged with: , , ,