Peter Kazazes Peter Kazazes - 9 months ago 65
iOS Question

if (device == iPad), if (device == iPhone)

So I have a universal app and I'm setting up the content size of a

. Obviously the content size is going to be different on iPhones and iPads. How can I set a certain size for iPads and another size for iPhones and iPod touches?

Answer Source
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
     // The device is an iPad running iOS 3.2 or later.
     // The device is an iPhone or iPod touch.