IT개발/iOS
iPad 구분하는 법
동물원
2012. 1. 28. 17:02
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
// The device is an iPad running iOS 3.2 or later.
}
else {
// The device is an iPhone or iPod touch.
}
위의 방법이 [UIDevice currentDevice].model 을 확인 하는 방법보다 더 나은 듯 함.
출처:http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW18