Knowing what the right size of a component in in iOS can be tough sometimes. Yes you can query it at run time, and yes you can use tools like reveal, but sometimes among all the various displays and screens you just want to know how big this status bar is.

One way to do that is like this.

Run the simulator. Take a screen shot of your app and control drag the distance in preview.

Screen Shot 2017-04-06 at 7.57.36 AM.png

 

This navigation bar, in portrait mode, says 128. Which means it will be 64 in my app after taking retina into account.

Note: This method isn’t fool proof. And I still recommend googling for the dimensions you are looking for.

Advertisements