tags:

views:

115

answers:

3

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: 

Check out the documentation for UIDevice

falconcreek
+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
A: 

Look at UIDevice and it's properties. There is a systemVersion string that will work for what you want.

Caleb Thompson