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

  • Home
  • SEARCH
  • 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 7965375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:08:15+00:00 2026-06-04T06:08:15+00:00

I am using a third party lib, HJCacheClasses , for loading images asynchronously. Here

  • 0

I am using a third party lib, HJCacheClasses, for loading images asynchronously. Here is the code for the same. It’s pretty much straightforward:

NSMutableString *url = @"my url";
    HJManagedImageV *asyncImageView = [[HJManagedImageV alloc] initWithFrame:frame];
    [asyncImageView setBackgroundColor:[UIColor grayColor]];
    [asyncImageView showLoadingWheel];
    [asyncImageView setContentMode:UIViewContentModeScaleAspectFill];
    [asyncImageView.imageView setContentMode:UIViewContentModeScaleAspectFill];
    asyncImageView.url = [NSURL URLWithString:url];

    [self.imageManager manage:asyncImageView];
    [the_pScrollView addSubview:asyncImageView];

Everything works fine except that the image is centered and it not getting stretched/fitted according to the size of the view (which is of size of full screen). I know the image is small but I need to make it fit in the view to fill the view. but none of the setContentMode are working.

  • 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-04T06:08:17+00:00Added an answer on June 4, 2026 at 6:08 am

    I found the answer myself which I feel is more simpler and strightforward. As Ican mentioned,in the source code of the HJManagedImageV class,the author hardcoded the imageView of the HJManagedImageV instance to always be aspect fit. So I just commented that code… For people who like to do the same follow the following steps

    1. Go to HJManagedImageV.m file
    2. search for a method named

      -(void) setImage:(UIImage*)theImage
      
    3. comment the line

      imageView.contentMode = ...
      

      or set the content mode you want to for the imageView. Note: This will set the content mode for all the imageViews using this class. So I prefer to go with first option.

    4. In the code where you are using this class, set the content mode for the HJManagedImageV.

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

Sidebar

Related Questions

I am using a third party .Net dll in my code and when I
I have a VC++ application compiled against a third party DLL (using their LIB
I have application building using third party apis, j2me apis,application code distributed in various
I have a program that i compiled and ran using third party lib on
I am working on TCP client server application using c++.third party lib are now
I have a simple player i am using third party libraries. Exactly the same
I'm using a third party C++ lib in one of my current projects. Their
I am using require.js just for loading not third party javascripts modules . So
When using third-party libraries such as jquery, yui-reset, swfobject and so on, do you
What is the simplest way (preferably without using third party frameworks) in objective c,

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.