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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:33:59+00:00 2026-06-13T17:33:59+00:00

So I have this UIImageView with an image on top of it. When I’m

  • 0

So I have this UIImageView with an image on top of it. When I’m using normal iPhone display, it shows inside the UIImageView exactly as it supposed to – in the UIImageView bounds, the problem is when I’m using retina display device, the image becomes big and doesn’t fit the UIImageView bounds, it goes all over the screen.

How can I fix this issue? I want the image in Retina display to fit inside the UIImageView size.

This is my code:

- (UIImage *)loadScreenShotImageFromDocumentsDirectory
{
    UIImage * tempimage;
    NSArray *sysPaths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES );
    NSString *docDirectory = [sysPaths objectAtIndex:0];
    NSString *filePath = [NSString stringWithFormat:@"%@/MeasureScreenShot.png", docDirectory];
    tempimage = [[UIImage alloc] initWithContentsOfFile:filePath];

    return tempimage;
}

- (void)viewDidLoad
{
    // Setting the image
    UIImage * Image = [self loadScreenShotImageFromDocumentsDirectory];
    theImageView.frame = CGRectMake(0, 166, 290, 334);
    theImageView.contentMode = UIViewContentModeCenter;        
    theImageView.image = Image;
}

Thank in advance!

  • 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-13T17:33:59+00:00Added an answer on June 13, 2026 at 5:33 pm

    Try setting the content mode to UIViewContentModeScaleAspectFit

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

Sidebar

Related Questions

In my view I have few subviews. This is UIImageView. Each UIImageView contain image
I have an iPad application that has a base image UIImageView (in this case
I have an image inside an UIImageView which is within a UIScrollView. What I
i have a view with uiimageview i assign this uiimageview image by camera..now i
I have a UIImageView that I dynamically load with an Image using myTableViewCell.myImageView.image =
I have 25 UIControls and 10 UIImageView. It looks like this: Now the images
I have an UIImageView with an image. Now I have a completely new image
I have an UIImageView (100x100px) and when a user taps on the image I
I have a UIImageView with an image that I want to be stretchable. In
I have an UIImageView inside an UIScrollView. I want that the user can zoom

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.