iDev
[iOS Dev] iPad인지 아닌지 구분하기
KraZYeom
2012. 1. 16. 08:21
반응형
UIDevice.h 에 다음과 같이 정의 되어 있습니다.
typedef enum {#if __IPHONE_3_2 <= __IPHONE_OS_VERSION_MAX_ALLOWED
UIUserInterfaceIdiomPhone, // iPhone and iPod touch style UI
UIUserInterfaceIdiomPad, // iPad style UI
#endif
} UIUserInterfaceIdiom;
BOOL iPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad;
뭐 이렇게 하면 iPad 인지 아닌지 구분 할 수 있겠네요.
반응형