if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { NSLog(@"iPad\n"); } else { NSLog(@"iPhone\n"); }