How to detect iOS device programmatically
问题 I need to know which iOS device is currently running app (saying more exactly I need to know is device armv6 or armv7). UIUserInterfaceIdiomPad() could not check is device an iPhone4S or iPhone3G. Is it possible? 回答1: Download https://github.com/erica/uidevice-extension (UIDevice-Hardware class) and you can use these: [UIDevice currentDevice] platformType] // returns UIDevice4GiPhone [[UIDevice currentDevice] platformString] // returns @"iPhone 4G" Or check if its retina + (BOOL) isRetina {