-2

I have added Kingfisher to an UI Image in a tableview cell but it does not work properly. The below is the example of the code that I have tried previously,

directoryPresenter!.getProfileImage(id:(directoryPresenter!.getEmployeeItem(position: indexPath.row).employeeID)) { image in
      cell.profileImage.kf.base.image = image
   // cell.profileImage.image = image
}

Can we add Kingfisher to an UI Image without passing an URL. Most of the questions I found was related to URLs. Please help me to figure out the issue

1 Answers1

0

If you are using a locally saved image, you don't need to use Kingfisher, just do it like this:

cell.profileImage.image = image

if you want to show image using a url, do it like this:

cell.profileImage.kf.setImage(with: {imageURL})
isaim07
  • 46
  • 6