How to check if your app is running on an iPad or an iPhone

Here’s how we check that:

    // if we're an iPad
    if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPad) {

        // do some iPad or iPad Mini specific stuff
    
    } else {

        // we're on iPhone or iPod Touch
    }

Alternatively you can check the same method for UIUserInterfaceIdiomPhone instead, which is returned when you’re on an iPhone or iPod touch.