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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:04:55+00:00 2026-06-08T07:04:55+00:00

I am having some troubles using the +UIImage setImageWithURL: method. What I would like

  • 0

I am having some troubles using the +UIImage setImageWithURL: method. What I would like to do is first send an asynchronous request for a thumbnail image. This image is very small so it should load fairly quickly. I also want to send another asynchrous request to download the hi-res version of the image since it takes a little longer to load.

I assumed it would be something like:

NSURL *thumbURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.server.com/uploads/thumbs/%@.png", name]];
[imageView setImageWithURL:thumbURL placeholderImage:[UIImage imageNamed:@"PHImage.png"]];

NSURL *hiRezURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.server.com/uploads/%@.png", name]];
[imageView setImageWithURL:hiRezURL];

but that just loads the hi-res image and takes too long. Any suggestions?

  • 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-08T07:04:57+00:00Added an answer on June 8, 2026 at 7:04 am

    If you take a look at the implementation of UIImageView+AFNetworking.m you see that it declares a property:

    @property (readwrite, nonatomic, retain, setter = af_setImageRequestOperation:) AFImageRequestOperation *af_imageRequestOperation;
    

    and the first thing that - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage method does (it actually first calls -setImageWithURLRequest:placeholderImage:success:failure:), is [self cancelImageRequestOperation]; and that actually cancels the operation of the class property, af_imageRequestOperation.

    That means, when you call the method again (on your 3rd) line, it cancels the operation of the 1st line.

    A better approach would be if you use + imageRequestOperationWithRequest:imageProcessingBlock:success:failure: and set the image of image view in the success block. I think if you use this method, you need also to call [operation start]; afterwards.

    Hope it helps.

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

Sidebar

Related Questions

I'm having some troubles pausing and resuming a method. (Using Java in Eclipse). Basically
I'm having nice first days using Yii but have some troubles with getting things
I'm having some troubles using Session Variables as they are being used as Reference
I am using VS2012 and having some troubles publishing an mvc4 website. None of
So this is my first time using cookies and i'm having some trouble setting
I'm having some troubles with using the std::sort algorithm here. I was reading that
I am having some troubles with validation using jquery to post a forms data
Using SQL Server 2008... I'm having some troubles in trying to order my rows
I'm trying to get started using git, but I'm having some troubles right away.
I've just started using hibernate 3.6.0 and JPA 2.0 and I'm having some troubles.

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.