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
+ (UIImage*)imageNamedForDevice:(NSString*)name { | |
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
{ | |
if (([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale) >= 1136.0f) | |
{ | |
//Check if is there a path extension or not | |
if (name.pathExtension.length) { | |
name = [name stringByReplacingOccurrencesOfString: [NSString stringWithFormat:@".%@", name.pathExtension] | |
withString: [NSString stringWithFormat:@"-568h@2x.%@", name.pathExtension ] ]; |
NewerOlder