<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIBarAppearance",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIBarAppearance"
  },
  "title" : "UIBarAppearance"
}
-->

# UIBarAppearance

An object for customizing the basic appearance of system bars.

```
@MainActor class UIBarAppearance
```

## Overview

A [`UIBarAppearance`](/documentation/UIKit/UIBarAppearance) object contains the common traits shared by navigation bars, tab bars, and toolbars. When configuring a specific type of bar, you usually instantiate the appropriate bar appearance subclass. However, you may also create a [`UIBarAppearance`](/documentation/UIKit/UIBarAppearance) object, configure its properties, and use it to create new bar appearance objects in your app.

## Topics

### Creating a custom bar appearance object

[`-  initWithIdiom:`](/documentation/UIKit/UIBarAppearance/init(idiom:))

Creates a new bar appearance object that targets the specified idiom.

[`-  initWithBarAppearance:`](/documentation/UIKit/UIBarAppearance/init(barAppearance:))

Creates a new bar appearance object by copying relevant data from the specified appearance object.

[`-  init`](/documentation/UIKit/UIBarAppearance/init())

Creates a new bar appearance object containing default values.

[`-  initWithCoder:`](/documentation/UIKit/UIBarAppearance/init(coder:))

Creates an appearance object from data in an unarchiver.

### Copying a custom bar appearance object

[`-  copy`](/documentation/UIKit/UIBarAppearance/copy())

Creates a copy of the appearance object.

### Resetting the appearance properties

[`-  configureWithDefaultBackground`](/documentation/UIKit/UIBarAppearance/configureWithDefaultBackground())

Configures the bar appearance object with default background and shadow values.

[`-  configureWithOpaqueBackground`](/documentation/UIKit/UIBarAppearance/configureWithOpaqueBackground())

Configures the bar appearance object with a set of opaque colors that are appropriate for the current theme.

[`-  configureWithTransparentBackground`](/documentation/UIKit/UIBarAppearance/configureWithTransparentBackground())

Configures the bar appearance object with a transparent background and no shadow.

### Configuring the background appearance

[`backgroundEffect`](/documentation/UIKit/UIBarAppearance/backgroundEffect)

The blur effect to apply to the bar’s background.

[`backgroundColor`](/documentation/UIKit/UIBarAppearance/backgroundColor)

The background color of the bar.

[`backgroundImage`](/documentation/UIKit/UIBarAppearance/backgroundImage)

The image to display on top of the bar’s background color.

[`backgroundImageContentMode`](/documentation/UIKit/UIBarAppearance/backgroundImageContentMode)

The content mode to use when displaying the bar’s background image.

### Configuring the shadow appearance

[`shadowColor`](/documentation/UIKit/UIBarAppearance/shadowColor)

The color to apply to the bar’s custom or default shadow.

[`shadowImage`](/documentation/UIKit/UIBarAppearance/shadowImage)

The image to use for the bar’s shadow.

### Getting the supported idiom

[`idiom`](/documentation/UIKit/UIBarAppearance/idiom)

The idiom targeted by this bar appearance object.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

### Inherited By

[`UINavigationBarAppearance`](/documentation/UIKit/UINavigationBarAppearance)

[`UITabBarAppearance`](/documentation/UIKit/UITabBarAppearance)

[`UIToolbarAppearance`](/documentation/UIKit/UIToolbarAppearance)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)