onevcat / Kingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.
MIT License
23.4k stars 2.66k forks source link

How to set image for UITabBarItem #1157

Closed aliunco closed 5 years ago

aliunco commented 5 years ago

I know that to set the image for tabbar item I can use the code below, but is it possible to set image with url using kingfisher?

    self.tabBarItem.image = UIImage(named: "item")
    self.tabBarItem.selectedImage = UIImage(named: "item_selected")
onevcat commented 5 years ago

Kingfisher does not provide the extension methods for setting images for a bar item. You need to use KingfisherManager to get the image and set it manually yourself.

See this section in our wiki for more.