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

    func setColorsTo(normal inNormalColor: UIColor? = nil,
                     selected inSelectedColor: UIColor? = nil,
                     background inBackgroundColor: UIColor? = nil)

    Parameters

    normal

    The color to use for an unselected, enabled tab item.

    selected

    The color to use for a selected tab item.

    background

    The background color to use for the bar.