Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of type 'UIImageView' has no member 'kf' in swift 4

Tags:

I am using Kingfisher library for downloading an image from URL and setting to UIIMageView in Swift 4 project.

I know there are API changes between Kingfisher 2 and Kingfisher 3

https://github.com/onevcat/Kingfisher/wiki/Kingfisher-3.0-Migration-Guide

My project was working a few weeks back but after upgrading Xcode, cannot compile the project. It gives error

enter image description here

I have tried deleting derived data and all possible solutions from the links I have got it from google.

Anyone facing the same issue with Kingfisher library?

Note: I have manually added Kingfisher library in the project. Not by pod or other package managers.

like image 441
nikhilgohil11 Avatar asked Dec 13 '17 13:12

nikhilgohil11


2 Answers

Use this pod:

pod 'Kingfisher'

Update Your Pod:

pod update

Import this library in your class file:

import Kingfisher
like image 57
Ravi Padsala Avatar answered Oct 15 '22 09:10

Ravi Padsala


This simple line work for me , although we normally don't need to import it

import Kingfisher
like image 35
Yodagama Avatar answered Oct 15 '22 11:10

Yodagama