You can use this function to detect iphone and ipad device on runtime. If function return TRUE then the device is iPhone ELSE the device is ipad.

-(BOOL)isIphone
{

BOOL rValue = TRUE;

#ifdef __IPHONE_3_2
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
rValue = FALSE;
#endif

return rValue;
}

Advertisements

One thought on “How to detect iPhone and iPad

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s