---
title: system
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uimenubuilder/system
---

# system

The menu system that the menu builder modifies.

## Declaration

```swift
var system: UIMenuSystem { get }
```

## Discussion

Discussion Always check the system property to determine which menu system the builder is modifying before you add and remove menus. For example, when you want to modify the main menu bar, check system for main. override func buildMenu(with builder: UIMenuBuilder) {     super.buildMenu(with: builder)          // Ensure that the builder is modifying the menu bar system.     guard builder.system == UIMenuSystem.main else { return }          let refreshCommand = UICommand(title: "Refresh", action: #selector(refreshData(_:)))     let refreshMenu = UIMenu(title: "", options: .displayInline, children: [refreshCommand])

// Insert the menu into the File menu before the Close menu.     builder.insertSibling(refreshMenu, beforeMenu: .close) }

## See Also

### Getting menu systems and elements

- [menu(for:)](uikit/uimenubuilder/menu(for:).md)
- [action(for:)](uikit/uimenubuilder/action(for:).md)
- [command(for:propertyList:)](uikit/uimenubuilder/command(for:propertylist:).md)
