How to check if our app is running on an iPad or iPhone
The easiest way is using the UI_USER_INTERFACE_IDIOM
macro. Only SDKs 3.2 an later support it. Here an example:
In the same way:
The macro uses the [[UIDevice currentDevice] userInterfaceIdiom]
method. If you are sure that your SDK supports the userInterfaceIdiom selector, you can also use something like this:
This post was originally published on escogitare.blogspot.it.