Friday, November 2, 2012

iOS: Differentiate Between iPhone and iPad

Use the function "UI_USER_INTERFACE_IDIOM()".

If what it returns is equals to "UIUserInterfaceIdiomPad", it's an iPad.

If what it returns is equals to "UIUserInterfaceIdiomPhone", it's an iPhone.

Reference: http://stackoverflow.com/questions/3905603/is-it-safe-to-check-for-ui-user-interface-idiom-to-determine-if-its-an-iphone

No comments:

Post a Comment