Ramotion / animated-tab-bar

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
https://www.ramotion.com/animated-tab-bar-ios-app-development-ui-library/
MIT License
11.13k stars 1.33k forks source link

tintColor of selected item #206

Closed veer9002 closed 5 years ago

veer9002 commented 6 years ago

First a fall, I want to say thank you very much for creating such a beautiful library. I love your lib, but I want to change the selectedItemImageColor and it's text color. I am able to change the tabbar item's text and icon color but not find any solution to change the default blue color for selectedItem. I want to change the color of selectedItemText and icon color. I tried Image tint from tab bar (storyboard) but still not changing the selectedItem color. When I change the class of tabbar controller to its default class (UITabbarController). It allow me to change the the selected item color.

Thanks.

PiotrPawlus commented 6 years ago

up

furkankadioglu commented 6 years ago

up!

0ber commented 6 years ago

You can change tint color in RAMItemAnimation https://github.com/Ramotion/animated-tab-bar/blob/master/RAMAnimatedTabBarController/RAMItemAnimationProtocol.swift#L52-L59

tint-color

aserdah commented 6 years ago

thank @ober01 ober01 for your answer

Angelzzz commented 6 years ago

Anyone can you help me to set unselected item color for RAMAnimatedTabBarController

amit2908 commented 5 years ago

I am not able to change even the unselected item color to default color.

marcelosalloum commented 5 years ago

I've created the following convenience init method, I hope it helps you guys

extension RAMAnimatedTabBarItem {
    convenience init(title: String, image: UIImage?, tag: Int, animation: RAMItemAnimation, selectedColor: UIColor, unselectedColor: UIColor) {
        self.init(title: title, image: image, tag: 0)
        animation.iconSelectedColor = selectedColor
        animation.textSelectedColor = selectedColor
        self.animation = animation
        self.textColor = unselectedColor
        self.iconColor = unselectedColor
    }
}
ShenYj commented 4 years ago

it's worked!