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 998199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:09:19+00:00 2026-05-16T07:09:19+00:00

Is ther any way to perform a runtime check for the iPhone device at

  • 0

Is ther any way to perform a runtime check for the iPhone device at runtime?
It has to be able to differenciate iPhone 4 from other iPhone/iPod touch models.
Any workaround that does the same thing is OK too.

  • 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-05-16T07:09:20+00:00Added an answer on May 16, 2026 at 7:09 am

    I use some code like this for the same purpose:

    if([[UIScreen mainScreen] respondsToSelector:@selector(scale)])
        return [[UIScreen mainScreen] scale] == 2.0 ? YES : NO;
    return NO;
    

    Only iOS 4.x+ devices support the UIScreen scale instance method. And since iPhone4’s don’t run iOS 3, we can rule those out right away. Next, we check if the scale factor is 2.0, if so we know it has a retina display.

    While this isn’t definitive (apple could release another retina device tomorrow), it does test ‘model’ where it’s important — i.e., you could be fetching images from a web service that provides @2x images and standard images, which is what I’m doing, which means you need to write the scaling image support manually, you don’t get it for free as with UIImage’s -imageNamed: for local files.

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

Sidebar

Related Questions

Is ther any way to pass a non static value to a actionfilter parameter
I am trying to create a way of making sure that every space has
Is ther any form to enable logs for sitemesh ? I already put this
I'm trying to perform a Median filter on an image in Java but it's
I am working on files n folder using C#....May I know is there any
I have a one line batch file that I want to call from a
Given a specific set of strings, what's the best way to map them to
Can any one help me ..... When i close the Apache service then also
I tried to loop from 0.1 to 2.0 and then print the output to
Hy I'm trying to get all the videos from a user and put them

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.