Skip to content

Instantly share code, notes, and snippets.

@antokne
Last active December 16, 2015 00:59
Show Gist options
  • Save antokne/5351672 to your computer and use it in GitHub Desktop.
Save antokne/5351672 to your computer and use it in GitHub Desktop.
iPhone 5 defines
// put these in you pch
#define isPhone568 ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568)
#define iPhone568ImageNamed(image) (isPhone568 ? [NSString stringWithFormat:@"%@-568h.%@", [image stringByDeletingPathExtension], [image pathExtension]] : image)
#define iPhone568Image(image) ([UIImage imageNamed:iPhone568ImageNamed(image)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment