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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:43:58+00:00 2026-06-13T10:43:58+00:00

I am lazy loading an image via setImageWithURL into a UIImageView embedded in a

  • 0

I am lazy loading an image via setImageWithURL into a UIImageView embedded in a UIScrollView.

Since this is fora photo gallery, I am trying to use the ‘success’ code block to set myScrollView‘s contentSize and the imageview’s frame after it completely loads so it can zoom properly.

Problem is, I keep getting a strange error using ‘success’ in my call. If I comment out the success/failure portion of the method, it works but I can’t tell when the image finishes loading, and thus cannot size the container correctly so it zooms properly… help?

Error:

Incompatible block pointer types sending 'void (^)(UIImage *__strong)' to parameter of type 'SDWebImageSuccessBlock' (aka 'void (^)(UIImage *__strong, BOOL)')

Is the error I receive on the following code @ the line beginning with success:^…

Code:

 [_ivFullSize setImageWithURL:[NSURL URLWithString:[currentPhoto PhotoAbsoluteLocation]]
placeholderImage:[UIImage imageNamed:@"loading.png"]
success:^(UIImage *image){
                         [DejalBezelActivityView removeViewAnimated:YES];
                         self.myScrollView.contentSize = self.ivFullSize.image.size;
                         self.ivFullSize.frame = CGRectMake(0, 0,     self.ivFullSize.image.size.width, self.ivFullSize.image.size.height);
                     }
                     failure:^(NSError *error){
                                    [DejalBezelActivityView removeViewAnimated:YES];
                     }];
  • 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-13T10:43:59+00:00Added an answer on June 13, 2026 at 10:43 am

    I have run into the same problem recently, after upgrading the SDWebImage version to the latest one. I have no idea why this is happening, but I would assume that it is an undocumented change in the function block. Basically the function is returning an additional boolean parameter.

    So without knowing the reason of the problem, I have solved it by simply adding a new boolean parameter to the block. Instead of writing

    ...
    success:^(UIImage *image)
    {
      ... do something with image
    }
    failure:^(NSError *error)
    ...
    

    I used the following:

    ...
    success:^(UIImage *image, BOOL dummy)
    {
      ... do something with image and ignore dummy
    }
    failure:^(NSError *error)
    ...
    

    This removes the raised error but still leaves questions on the nature of the additional boolean variable. Any additional documentation or clarification would be greatly appreciated. The documentation here still refers to the old version.

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

Sidebar

Related Questions

I'm trying to implement lazy loading on a blogger blog, but I'm running into
I follow this tutorial http://wptrafficanalyzer.in/blog/android-lazy-loading-images-and-text-in-listview-from-http-json-data/ . and I wonder, how can i click the
I came across an early post regarding lazy loading image in listview, and tried
Hello i am using the EGOImageView for lazy image loading.I m using the same
I follow this toturial Android Lazy Loading images and text in listview from http
Is there an iOS 5 arc compatible lazy Image loading library? I've not found
NOTE: I am using ARC I have a lazy image loading technique that works
I'm extending Apple's template for lazy table image loading . I would like the
I recently ran into a problem with dynamically (lazy) loading images within elements (UIViewController-Subclasses)
I'm doing some lazy loading of images into an array when the app has

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.