Skip to content

Instantly share code, notes, and snippets.

@bobspryn
Created February 18, 2014 22:24
Show Gist options
  • Select an option

  • Save bobspryn/9081712 to your computer and use it in GitHub Desktop.

Select an option

Save bobspryn/9081712 to your computer and use it in GitHub Desktop.
isPhone568.h
#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