5
A
回答
1
从我挂在注释后
#import <sys/utsname.h>
NSString*
machineName()
{
struct utsname systemInfo;
uname(&systemInfo);
return [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
}
结果应该是:
@"i386" on the simulator
@"iPod1,1" on iPod Touch
@"iPod2,1" on iPod Touch Second Generation
@"iPod3,1" on iPod Touch Third Generation
@"iPod4,1" on iPod Touch Fourth Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
@"iPad1,1" on iPad
@"iPad2,1" on iPad 2
@"iPhone3,1" on iPhone 4
@"iPhone4,1" on iPhone 4S
我假定这将返回类似@“iPhone5,1”最新模型。然后,只需做这样
NSString *iphoneType = machineName();
if ([iphoneType [email protected]"iPhone5,1"]){
//image for iphone 5
} else {
//image for the rest
}
支票让我知道,如果可以算出
相关问题
- 1. iPhone 6的iOS背景图像
- 2. 拉伸iOS背景图像
- 3. UITableView的背景图像 - iOS
- 4. 背景图像上的iOS
- 5. iOS应用背景图像
- 6. UITabbar的背景图像ios
- 7. 调整图像背景iOS
- 8. 设置一个随机应用程序背景图像iOS 6
- 9. LaunchImage和背景图像不支持3.5“,而支持iOS 6
- 10. 在背景图像背景图像
- 11. 自定义UIButton背景图像显示在iOS 6但不是iOS 5
- 12. UINavigationBar原始分辨率iPhone 6和6的背景图像
- 13. 背景图像
- 14. 背景图像
- 15. 图像背景
- 16. 图像背景
- 17. 背景图像
- 18. 的iOS UIView的背景图像
- 19. 为iOS设置网站背景图像
- 20. 在iOS上不显示背景图像
- 21. UIButton背景图像拉伸Xcode iOS
- 22. 的iOS - pushViewController无滑动背景图像
- 23. iOS 7通用背景图像
- 24. 导航背景图像xamarin ios
- 25. 支持视网膜背景图像iOS
- 26. 的iOS使用图像背景按钮
- 27. 的iOS UIScrollView的副本图像背景
- 28. sectionHeader在iOS中的背景图像
- 29. 背景图像为Android和IOS
- 30. iOS - UITableView非静态背景图像
计划的方式是明确的。可能它有什么“通过Apple批准”? 喜欢用@xxx名字等图像 –
你是说整个背景是一个图像? – TheJer
假定它是:) –