How to find out if application is running on iPhone or iPad?

This snippet deals with finding out whether application is running on iPhone or ipad…

 

Just insert the code given below at the place you want to check

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
		NSLog(@"ipad");
	}
	else {
		NSLog(@"iPhone");
	}

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>