Skip to content

Instantly share code, notes, and snippets.

@xen
Last active June 22, 2016 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xen/01c913b4b13759e035880f74dcaa3f8f to your computer and use it in GitHub Desktop.
Save xen/01c913b4b13759e035880f74dcaa3f8f to your computer and use it in GitHub Desktop.
isretina.py
from objc_util import *
us = ObjCClass('UIScreen')
if us.mainScreen().scale() == 2.0:
print('Retina')
elif us.mainScreen().scale() == 3.0:
print('iPhone 6 Plus')
else:
print('Non retina')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment