How to determine screen size in iOS

The UIDevice class can help us do that like so:

This will work fine in your View Controllers and App Delegate files.

I’ve got a full working demo project on GitHub: https://github.com/versluis/ScreenSize

Further Reading:

About Jay Versluis

Jay is a medical miracle known as a Super Survivor. He runs two YouTube channels, five websites and several podcast feeds. To see what else he's up to, and to support him on his mission to make the world a better place, check out his Patreon Campaign.

Add your voice!