First of all I'm trying to lazy load images from remote url and what I've done so far is as follows, - I have created custom UITableViewCell which contains on UIImageView and other labels using XIB and mapped it to my custom UITableViewCell class. - I'm using the custom table cell in my UITableView - UIImageView inside the custom cell, loads remote image as per Apple's tutorial for lazy loading images for tableview - Initially ImageView displays an loading image, once the image is loaded, the loaded image gets updated inside ImageView or if it fails, No Image will get displayed
And the problem here is, the remote images are of variable sizes, lets say if the image is smaller than the ImageView frame the image stretches and display as blurry but once we scroll or on row selection its re-size to actual size and looks fine. At the same time if the image is larger than the ImageView frame it fits correctly fit inside the frame but again if we scroll or select the row it occupy size bigger than frame and hides other elements in the row
And I searched for hours and all I got is setting content mode to UIViewContentModeScaleToFit and setting clipsToBounds to 'YES', I made those changes as well both in XIB, as well as in Code but it doesn't change anything. Can someone point me, on what I'm doing wrong or how to fix this issue.
Thanks.