Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7783437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T19:50:20+00:00 2026-06-01T19:50:20+00:00

I have an app that runs on the iPhone and iPod Touch, it can

  • 0

I have an app that runs on the iPhone and iPod Touch, it can run on the Retina iPad and everything but there needs to be one adjustment. I need to detect if the current device is an iPad. What code can I use to detect if the user is using an iPad in my UIViewController and then change something accordingly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T19:50:21+00:00Added an answer on June 1, 2026 at 7:50 pm

    There are quite a few ways to check if a device is an iPad. This is my favorite way to check whether the device is in fact an iPad:

    if ( UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad )
    {
        return YES; /* Device is iPad */
    }
    

    The way I use it

    #define IDIOM    UI_USER_INTERFACE_IDIOM()
    #define IPAD     UIUserInterfaceIdiomPad
    
    if ( IDIOM == IPAD ) {
        /* do something specifically for iPad. */
    } else {
        /* do something specifically for iPhone or iPod touch. */
    }   
    

    Other Examples

    if ( [(NSString*)[UIDevice currentDevice].model hasPrefix:@"iPad"] ) {
        return YES; /* Device is iPad */
    }
    
    #define IPAD     (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    if ( IPAD ) 
         return YES;
    

    For a Swift solution, see this answer: https://stackoverflow.com/a/27517536/2057171

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that runs on iPad and iPhone running iOS 3.2, but
I have an app that runs slowly on an iPhone 3G but is fast
I have an app that runs for a while, but needs to be reset
I have written a universal iOS-App that runs fine on my iPhone and iPad,
i have an app that runs perfectly on android 1.6+, but admob ads are
I have a web app that runs fine in Visual web developer. But when
I have an iPhone app that I'm trying to run on my phone via
I have a universal app built that runs and works perfectly on an iPad,
I have an iPhone app that compiles and runs fine in the Simulator on
I have an app that runs a stored procedure in SQL Server, checking the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.