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

# UITitlebar

An object that you use to configure the title bar of a window in a Mac app built with Mac Catalyst.

```
@MainActor class UITitlebar
```

## Overview

Each [`UIWindowScene`](/documentation/UIKit/UIWindowScene) has a [`UITitlebar`](/documentation/UIKit/UITitlebar) object available in Mac apps built with Mac Catalyst. You use this object to configure the title bar and its toolbar.

To show or hide a title in the title bar, set the [`titleVisibility`](/documentation/UIKit/UITitlebar/titleVisibility) property to [`UITitlebarTitleVisibility.visible`](/documentation/UIKit/UITitlebarTitleVisibility/visible) or [`UITitlebarTitleVisibility.hidden`](/documentation/UIKit/UITitlebarTitleVisibility/hidden). If you set the visibility to hidden and the title bar’s [`toolbar`](/documentation/UIKit/UITitlebar/toolbar) property is `nil`, the window displays only the window control buttons (Close, Minimize, and Zoom).

To add a toolbar to a window, create an <doc://com.apple.documentation/documentation/AppKit/NSToolbar> object and assign it to the title bar’s [`toolbar`](/documentation/UIKit/UITitlebar/toolbar) property. To automatically hide the toolbar when the window enters full-screen mode, set the [`autoHidesToolbarInFullScreen`](/documentation/UIKit/UITitlebar/autoHidesToolbarInFullScreen) property to <doc://com.apple.documentation/documentation/Swift/true>.

```swift
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
    
    guard let windowScene = (scene as? UIWindowScene) else { return }
    
    #if targetEnvironment(macCatalyst)
    if  let titlebar = windowScene.titlebar {
        let identifier = NSToolbar.Identifier("com.example.apple-samplecode.toolbar")
        titlebar.toolbar = NSToolbar(identifier: identifier)
        titlebar.toolbar?.delegate = self
        titlebar.autoHidesToolbarInFullScreen = true
    }
    #endif
}
```

## Topics

### Configuring the title bar

[`separatorStyle`](/documentation/UIKit/UITitlebar/separatorStyle)

The type of separator that the app displays between the title bar and content of a window.

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

Styles that determine the type of separator displayed between the title bar and content of a window.

[`titleVisibility`](/documentation/UIKit/UITitlebar/titleVisibility)

A value that indicates the visibility of the title.

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

States that determine visibility of the title in the title bar.

[`representedURL`](/documentation/UIKit/UITitlebar/representedURL)

A URL of the file or resource represented in the window.

### Configuring the toolbar

[`toolbar`](/documentation/UIKit/UITitlebar/toolbar)

The toolbar displayed beneath or integrated with the title bar.

[`toolbarStyle`](/documentation/UIKit/UITitlebar/toolbarStyle)

The style of the toolbar determining its appearance and location related to the title bar.

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

Styles that determine the toolbar’s appearance and location related to the title bar.

[`autoHidesToolbarInFullScreen`](/documentation/UIKit/UITitlebar/autoHidesToolbarInFullScreen)

A Boolean value that determines whether the toolbar automatically hides in full-screen windows.



---

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)