我需要区分我的 iPhone 应用程序中的视网膜屏幕或普通屏幕,类似于以下内容:
#if TARGET_OS_IPHONE_VERSION < 3
NSString *uniquePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"close.png"];
UIImage *image = [UIImage imageWithContentsOfFile: uniquePath];
#endif
#if TARGET_OS_IPHONE_VERSION >= 4
NSString *uniquePath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"close@2X.png"];
UIImage *image = [UIImage imageWithContentsOfFile: uniquePath];
#endif
任何想法?