Hi I am getting this error when I implement this code Cannot convert value of type 'URL' to expected argument type 'String' I know what it means but is there a way I can change the code below to work?
var userProfile: UserProfile?{
didSet{
let url = URL(string: (userProfile?.photoURL)!)
if let url = url as? URL{
KingfisherManager.shared.retrieveImage(with: url as Resource) { (image, error, cache, imageURL) in
self.profileImage.image = image
self.profileImage.kf.indicatorType = .activity
}
}
}
}