I add the following code to a VStack in SwiftUI:
KFImage.url(url)
.placeholder(UIImage(named: "logo"))
.setProcessor(processor)
.loadDiskFileSynchronously()
But XCode doesn't like it and says "Cannot convert value of type UIImage? to expected argument type '() -> Content'"
Kingfisher's cheatsheet indicates that the placeholder line should work:
.placeholder(UIImage(named: "logo"))
When I remove the placeholder line (line2 above), it works properly. But, of course, there is no placeholder.
Using SwiftUI, how can I set the placeholder for KFImage?
I've only been coding with Swift/SwiftUI for a month now so I'm quite new.
Thankyou.
Swift Version 5.0 Kingfisher Version 6.1.0