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

- by

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.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.