The gist provides a convenient Swift method to run a closure of UI-optimizing code on some devices selectively based on their logical height. The usage examples show:
- How to use the method to scale a view designed for iPhone 6+ to display on other devices. This is generally not recommended in production because scaling does not give good visual results.
- Adjust a
UIImageView
'scontentMode
on iPhone 5 (SE, 5s, 5c, etc) and below.