Below method is the utility method to check whether device is ipad or iphone while devloping universial application.Which works in even IOS 3.0
+(BOOL)isDeviceAniPad
{
#ifdef UI_USER_INTERFACE_IDIOM()
return UI_USER_INTERFACE_IDIOM();
#else
return NO;
#endif
}
jack:- nice peace of code
ReplyDeletewon't work, return UI_USER_INTERFACE_IDIOM(); does not return a BOOL value, u should use return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
ReplyDelete