Home Features Docs Blog Support GitHub

Calling category methods

(Eugene) #1

I’ve import Kingfisher Swift POD which adds a custom category into UIImageView, so the Swift code is like this:

let url = URL(string: "url_of_your_image")
imageView.kf.setImage(with: url)

After generating bindings I’ve got UIImageViewExt.java (see .nbc attached), but I’m puzzled how to call setImageWithUrl from my Java code.

Also the Nat/J docs says that there should be a @CategoryClassMethod annotation, but generating bindings doesn’t have that.

Could you please advise what am I missing and how to make those custom categories work?

Kingfisher.nbc (411 Bytes)

(Niels Cölle) #2

Could you solve this? Thanks.

(Eugene) #3

No, I removed dependency on Kingfisher

(Thomas Gallinari) #4

It is available as a static method of UIImageViewExt:

UIImageViewExt.sd_setImageWithURL(imageView, url);