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

# UIMainMenuSystem

The main menu system.

```
@MainActor class UIMainMenuSystem
```

## Topics

### Accessing the main menu system

[`class var shared: UIMainMenuSystem`](/documentation/UIKit/UIMainMenuSystem/shared)

The shared main menu system.

### Configuring a main menu system

[`func setBuildConfiguration(UIMainMenuSystem.Configuration, buildHandler: ((any UIMenuBuilder) -> Void)?)`](/documentation/UIKit/UIMainMenuSystem/setBuildConfiguration(_:buildHandler:))

[`- (void) setBuildConfiguration:(UIMainMenuSystemConfiguration *) configuration buildHandler:(void (^)(id<UIMenuBuilder>builder)) buildHandler;`](/documentation/UIKit/UIMainMenuSystem/setBuildConfiguration:buildHandler:)

Specifies that the main menu system should be built using the specified configuration.
A build handler can be optionally provided, which the main menu system will use instead of calling `-buildMenuWithBuilder:`.
Setting this will invalidate and rebuild the main menu system. Ideally it should be set once, and as early as possible, preferably in `-application:didFinishLaunchingWithOptions:`.
Subsequent rebuilds of the main menu system will continue to use this `configuration` and `buildHandler`.
It is a developer error to set the `configuration` while the main menu system is building. Doing so will assert.

[`class Configuration`](/documentation/UIKit/UIMainMenuSystem/Configuration)

A configuration for the main menu system.
You can specify whether or not certain elements are present in the initial main menu, as well as a block to build the menu using a UIMenuBuilder.

### Inspecting a configuration of find elements

[`class FindElementGroupConfiguration`](/documentation/UIKit/UIMenuSystem/FindElementGroupConfiguration)

Represents a configuration for find elements, should they be present.
You don’t create one of these directly. A configuration is provided as part of a `UIMainMenuSystemConfiguration`.

[`enum Style`](/documentation/UIKit/UIMenuSystem/FindElementGroupConfiguration/Style-swift.enum)

Represents a preference for the structure of Find elements in the main menu.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### Inherits From

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

---

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)