Forum Xamarin.iOS

SDWebImage Table Image Sizing


Having an issue with loading images into a table view using SDWebImage,

My code:

cell.ImageView.Layer.CornerRadius = 23; cell.ImageView.ClipsToBounds = true; cell.ImageView.SetImage ( url: new NSUrl (ArtistNames [indexPath.Row].Icon), placeholder: UIImage.FromBundle (ArtistIconPath), completedHandler: (image, error, cacheType) => { if (image != null) { image.Scale(new SizeF(50, 50), 0.0f); } } );

As you can see I am wanting to scale the images to be a uniform size, this works when scrolling down the table view, as soon as you scroll back up and the cell is reloaded the image scaling is lost and the image sizes defaults to the downloaded size. Any way I can have the images always uniformed?



  • ZaferSawafZaferSawaf CAMember ✭✭

    Hi Robert.

    Were you able to find a solution?

  • PerryPerry USMember ✭✭

    So two years later and this is still an issue with SDWebImage. Anybody have a solution for keeping the image view from resizing when you scroll the image offscreen and then back on?

Sign In or Register to comment.