Ekhoo / Device

Light weight tool for detecting the current device and screen size written in swift.
MIT License
1.7k stars 202 forks source link

Add a way to detect screen resolution #21

Closed selwin closed 2 years ago

selwin commented 8 years ago

iPhone 6 Plus uses 3x assets, everything else below it uses 2x image assets.

ZevEisenberg commented 6 years ago

You can do this with UIScreen.main.scale. It will give you back 1.0, 2.0, or 3.0.