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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:33:25+00:00 2026-05-27T13:33:25+00:00

The images I’m using in the tabbar are dynamic and I load them off

  • 0

The images I’m using in the tabbar are dynamic and I load them off the internet. I detect if I’m on retina display or not and download the correct images and initialize the tabbar using them.

Normal images are working fine. My problem is with retina images. They are displayed in big size, bigger than the tabbar, so they are not completely shown.

I wonder how should I load retina images into the tabbar and make them look normal.

Update:

Here’s the code I’m using to load the images to the tabbar from each view controller added:

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString* path = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithString:@"1.png"]];
    UIImage* image = [UIImage imageWithContentsOfFile:path];

It doesn’t matter if the images have @2x or not as I’m choosing normal or retina images manually.

  • 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-27T13:33:26+00:00Added an answer on May 27, 2026 at 1:33 pm

    I haven’t run across this problem myself, but I’d start by setting a breakpoint just after you create the image. Use the debugger to check the new image’s scale property. I think you’ll find that scale is set to 1.0, but your high resolution images should have scale set to 2.0. There are three ways (that I know of) to make that happen:

    • Name the file with a “@2x” suffix;
    • Set the ‘dpi’ attribute for your image appropriately;
    • Create the image with -initWithCGImage:scale:orientation: or +imageWithCGImage:scale:orientation:
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I usually load images in Applets using: this.getImage( getCodeBase(), myimage.png ); or myapplet.getImage( getCodeBase(),
Images are all different sizes. I'm using some jquery to resize them proportionally at
Images can be included in TextArea controls using the htmlText property: ta.htmlText = '<img
Using images with Core Data isn't a problem. There are a lot of examples
I saved button images in android as png. But its not showing right on
Images on my website pushing each other when I go over them with my
The images for my css header class load correctly in Chrome and FF, but
I am having 3 images. How can I access each one of them and
The Images API in Google App Engine does not appear to handle CMYK JPEG
These images on the bottom left of this link http://giantmango.com/i-love-art-13-3319 display in firefox, chrome,

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.