The Mobile Galaxy The New Mobile Era Has Come | Mobile – A Time To Remember

22Jan/130

Load Iphone 5 image in IOS

#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)])


and call method:

[UIImage imageNamed:iPhone568ImageNamed(@"iphone.png")]];
Share
Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*

No trackbacks yet.