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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:27:12+00:00 2026-05-16T16:27:12+00:00

What is the best pattern for displaying images both on iOS3 and iOS4? For

  • 0

What is the best pattern for displaying images both on iOS3 and iOS4?

For example, here’s code for a custom activity animation:

activityImageView.animationImages = [NSArray arrayWithObjects:  
[UIImage imageNamed:@"s01"],  
[UIImage imageNamed:@"s02"],  
[UIImage imageNamed:@"s03"],  
[UIImage imageNamed:@"s04"],  
[UIImage imageNamed:@"s05"],  
nil];

On low-res and high-res devices running iOS4, the images load as expected. On iOS3 the images cannot be found since the .png extension is seen as missing.

What’s the right way to deal with this situation? Do I need to throw hacky conditionals throughout my code or is there a cleaner method?

Is something from Matt Gallagher’s article a good approach?
http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html

  • 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-16T16:27:13+00:00Added an answer on May 16, 2026 at 4:27 pm

    You still get the auto ‘@2x’ loading behavior in iOS4 even if you use the file extension, so [UIImage imageNamed:@"so1.png"] is fine (it will find “so1@2x.png” if you’re running on a Retina Display with OS 4) plus it’s backwards compatible with 3, where it will always find the low-res version of the file.

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

Sidebar

Related Questions

Best explained with code I think, this is just a simple example: public class
I was wondering what the best pattern was to handle the management of images
What's best practice for structuring an activity, which should begin by displaying an animated
Is Model-View-ViewModel the best pattern to use in WPF? Are there any downsides?
What is the best method [pattern] to close a newly opened Windows form in
What's the best way to abstract this pattern: class MyClass attr_accessor :foo, :bar def
Best to describe this in code... I have this public class A<T> { public
I'm fairly new to design patterns. What is the best pattern when a developer
I am displaying date in JSF using pattern=dd-MMM-yyyy . When I am trying to
What is the best pattern for instrumentation. I have an application and i want

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.