Vaberer / Font-Awesome-Swift

Font Awesome swift library for iOS.
MIT License
743 stars 125 forks source link

UITabBarItem selectedImage #42

Closed fbomb111 closed 8 years ago

fbomb111 commented 8 years ago

Using setFAIcon on a tabBarItem only sets the image, so the image goes missing when you select that tab item. Adding selectedImage to the extension will fix the problem:

`public extension UITabBarItem {

    public func setFAIcon(icon: FAType) {
        FontLoader.loadFontIfNeeded()
        image = UIImage(icon: icon, size: CGSize(width: 30, height: 30))
        selectedImage = UIImage(icon: icon, size: CGSize(width: 30, height: 30))
    }
}`
uknowmeright commented 8 years ago

Thanks! exactly what I needed. This should be added to the main repo

Vaberer commented 8 years ago

Hello, implemented in v1.5.3 Thanks