Last active
December 16, 2015 00:59
-
-
Save antokne/5351672 to your computer and use it in GitHub Desktop.
iPhone 5 defines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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