locked
SDWebImage Completion Handler RRS feed

  • Question

  • User55346 posted

    Hi, the documentation for SDWebImage v3.7.1.4 seems a little out of date. I'm upgrading a one year old iOS app to the unified platform and the documentation doesn't seem to be up to date for the unified compatible version of SDWebImage.

    This is what I've currently figured out: imageView.SetImage ( new NSUrl ("http://www.someimagepath.com/imagename.jpg), UIImage.FromBundle ("Images/placeholder.jpg"), SDWebImageOptions.ProgressiveDownload, null, null );

    It's been a long day, so I could be missing something obvious but how do I add a completed handler? I need to update table cells when the download completes otherwise the images won't appear until the user scrolls.

    In previous versions I would have used: completedHandler: (image, error, cacheType) => { // Handle download completed... }

    Any pointers welcome.

    Thanks

    Thursday, July 16, 2015 6:54 PM

All replies

  • User55346 posted

    figured it out.. it's almost exactly the same as what I had previously.

    imageView.SetImage ( new NSUrl ("http://www.someimagepath.com/imagename.jpg), UIImage.FromBundle ("Images/placeholder.jpg"), SDWebImageOptions.ProgressiveDownload, null, (image,error,cachetype,NSNull) => { //update cell code } );

    can't believe I didn't spot that earlier!

    Thursday, July 16, 2015 9:04 PM