Instance Property

isTranslucent

A Boolean value that indicates whether the toolbar is translucent (true) or not (false).

Declaration

var isTranslucent: Bool { get set }

Discussion

The default value is true. If the toolbar has a custom background image, the default is true if any pixel of the image has an alpha value of less than 1.0, and false otherwise.

If you set this property to true on a toolbar with an opaque custom background image, the toolbar will apply a system opacity less than 1.0 to the image.

If you set this property to false on a toolbar with a translucent custom background image, the toolbar provides an opaque background for the image using black if the toolbar has UIBarStyle.black style, white if the toolbar has UIBarStyle.default, or the toolbar’s barTintColor if a custom value is defined.

See Also

Customizing Appearance

var barStyle: UIBarStyle

The toolbar style that specifies its appearance.

var barTintColor: UIColor?

The tint color to apply to the toolbar background.

var tintColor: UIColor!

The tint color to apply to the bar button items.

func backgroundImage(forToolbarPosition: UIBarPosition, barMetrics: UIBarMetrics) -> UIImage?

Returns the image to use for the background in a given position and with given metrics.

func setBackgroundImage(UIImage?, forToolbarPosition: UIBarPosition, barMetrics: UIBarMetrics)

Sets the image to use for the background in a given position and with given metrics.

func shadowImage(forToolbarPosition: UIBarPosition) -> UIImage?

Returns the image to use for the toolbar shadow in a given position.

func setShadowImage(UIImage?, forToolbarPosition: UIBarPosition)

Sets the image to use for the toolbar shadow in a given position.