Closed ispiropoulos closed 7 years ago
@ispiropoulos There you go:
open func setButtonImage(forIndex index: Int, normal: UIImage,selected: UIImage){
self.tabIcons?[index] = normal
self.selectedTabIcons?[index] = selected
updateInterfaceIfNeeded()
}
Just put this function anywhere in the class and it should work.
Thank you, but this is what I get, probably due to the fact that the images are not monochrome but for example a profile picture. The last tab icon
is the one that changed
Edit: I found the ignoreColor flag :) That's ok now :) Thank you
Is there any way I could change one Icon on the fly without reinitializing the tab bar controller?
eg: tabController.setButtonImage(forIndex: Int, image: UIImage, highlightedImage: UIImage)