I am developing a Cocoa Touch application for Apple's App store and I want to do some tweaking in the code depending on what device it's running on. How can I tell?
+1
A:
I've used this in a Universal app to determine if the code is running on an iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// Do iPad only stuff here
}
Ken Pespisa
2010-06-04 16:27:12
A:
Look at UIDevice
and it's properties. There is a systemVersion
string that will work for what you want.
Caleb Thompson
2010-06-04 16:33:43