Peter Kazazes Peter Kazazes - 1 year ago 78
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.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download