<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationItem/centerItemGroups",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UINavigationItem(py)centerItemGroups"
  },
  "title" : "centerItemGroups"
}
-->

# centerItemGroups

Customizable item groups to display in the center section of the navigation bar.

```
var centerItemGroups: [UIBarButtonItemGroup] { get set }
```

## Discussion

Use this property to specify *center item groups*, groups of controls that appear in the navigation bar to provide quick access to your app’s capabilities. Center items appear in the center of the navigation bar for the [`UINavigationItem.ItemStyle.browser`](/documentation/UIKit/UINavigationItem/ItemStyle/browser) and [`UINavigationItem.ItemStyle.editor`](/documentation/UIKit/UINavigationItem/ItemStyle/editor) styles, and in the overflow menu for the [`UINavigationItem.ItemStyle.navigator`](/documentation/UIKit/UINavigationItem/ItemStyle/navigator) style.

Optionally, you can allow people to customize the layout of center item groups and preserve that customization across app launches. When you create center item groups, you can choose from three types of behaviors:

- Create a fixed group to disallow moving or removing that group from the navigation bar.
- Create a movable group to allow moving a group in the navigation bar, but not removing it.
- Create an optional group to allow moving, removing, or adding back that group.

The following code enables center item layout customization by assigning a [`customizationIdentifier`](/documentation/UIKit/UINavigationItem/customizationIdentifier). Then, it shows two approaches to creating center item groups: creating a group from an array of items and creating a group from a single item.

```swift
// Specify a unique customization identifier to enable navigation bar layout customization.
navigationItem.customizationIdentifier = "MyCustomNavigationItem"

// Create a fixed group with multiple items.
let editingGroup = UIBarButtonItemGroup.fixedGroup(items: [
    UIBarButtonItem(title: "Undo", image: UIImage(systemName: "arrow.uturn.backward"), primaryAction: UIAction { _ in
        // Implement undo action.
    }),
    UIBarButtonItem(title: "Redo", image: UIImage(systemName: "arrow.uturn.forward"), primaryAction: UIAction { _ in
        // Implement redo action.
    })
])

// Create a movable group from a single item.
let croppingItem = UIBarButtonItem(title: "Crop", image: UIImage(systemName: "crop"), primaryAction: UIAction { _ in
    // Implement crop action.
})
let croppingGroup = croppingItem.creatingMovableGroup(customizationIdentifier: "Cropping")

navigationItem.centerItemGroups = [editingGroup, croppingGroup]
```

---

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)