UITabBarController
public extension UITabBarController
An extension to the standard UITabBarController class. This adds a method to ease customization of bar colors.
-
This allows us to set specific colors for the normal, selected, and background attributes of the tab bar. All parameters are optional. If not provided, default values for the current theme are used.
Declaration
Swift
@MainActor func setColorsTo(normal inNormalColor: UIColor? = nil, selected inSelectedColor: UIColor? = nil, background inBackgroundColor: UIColor? = nil)Parameters
inNormalColorThe color to use for an unselected, enabled tab item.
inSelectedColorThe color to use for a selected tab item.
inBackgroundColorThe background color to use for the bar.
View on GitHub