Instance Property

isTranslucent

A Boolean value that indicates whether the tab bar is translucent.

Declaration

var isTranslucent: Bool { get set }

Discussion

When the value of this property is true, the tab bar adds a translucent effect to its background image or tint color. When translucency is enabled, part of the tab bar’s underlying content is able to show through, although the amount that shows through depends on the rest of the tab bar configuration. For example, a background image can wholly or partially obscure the background content. Setting this property to false causes the tab bar to render its bar tint color or background image on top of an opaque backdrop.

The default value of this property is dependent on the configuration of the tab bar:

  • The default value is true when the tab bar does not have a custom background image.

  • The default value is true when a custom background image contains any transparency—that is, at least one pixel has an alpha value of less than 1.0.

  • The default value is false when the custom background image is completely opaque—that is, all pixels have an alpha value of 1.0.

See Also

Customizing Tab Bar Appearance

var barStyle: UIBarStyle

The tab bar style that specifies its appearance.

enum UIBarStyle

Defines the stylistic appearance of different types of views.

var barTintColor: UIColor?

The tint color to apply to the tab bar background.

var tintColor: UIColor!

The tint color to apply to the tab bar items.

var unselectedItemTintColor: UIColor?

The tint color to apply to unselected tabs.

var backgroundImage: UIImage?

The custom background image for the tab bar.

var shadowImage: UIImage?

The shadow image to use for the tab bar.

var selectionIndicatorImage: UIImage?

The image to use for the selection indicator.