Tuesday, July 10, 2012

Running on iPhone or iPad ?

Developing a universal app makes it a necessity to find out if the app is running on iPhone or iPad, accordingly you write your code block.
Here is the code:


if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
                
}
                
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
                
}

No comments:

Post a Comment