#1. iOS는 아래와 같이 Phone 타입과 Pad 타입의 Idiom이 있고, 선언되어있다.

typedef enum {

#if __IPHONE_3_2 <= __IPHONE_OS_VERSION_MAX_ALLOWED

    UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI

    UIUserInterfaceIdiomPad,             // iPad style UI

#endif

} UIUserInterfaceIdiom;



#2. UIDevice의 userInterfaceIdiom 함수를 통해서 Idiom 정보를 얻을 수 있다.

[[UIDevice currentDevice] userInterfaceIdiom]




#3. UI_USER_INTERFACE_IDIOM() 매크로를 사용하면, iOS 3.2 이하의 버전과 호환을 이루는 코드를 편하게 짤 수 있는데, 3.2 이하의 버전에는 iPad가 없었기 때문에 전부 phone 형태의 Interface Idiom이었으므로 매크로를 제공해주는 것으로 보인다.

+ Recent posts