---
title: "optionalGroupWithCustomizationIdentifier:inDefaultCustomization:representativeItem:items:"
framework: uikit
role: symbol
role_heading: Type Method
path: "uikit/uibarbuttonitemgroup/optionalgroupwithcustomizationidentifier:indefaultcustomization:representativeitem:items:"
---

# optionalGroupWithCustomizationIdentifier:inDefaultCustomization:representativeItem:items:

Creates an optional group that a person can move, add to, or remove from the navigation bar during layout customization.

## Declaration

```occ
+ (UIBarButtonItemGroup *) optionalGroupWithCustomizationIdentifier:(NSString *) customizationIdentifier inDefaultCustomization:(BOOL) inDefaultCustomization representativeItem:(UIBarButtonItem *) representativeItem items:(NSArray<UIBarButtonItem *> *) items;
```

## Parameters

- `customizationIdentifier`: A unique string to identify the group for navigation bar layout customization.
- `inDefaultCustomization`: A Boolean that determines whether to place the group in the navigation bar by default. Specify doc://com.apple.documentation/documentation/Swift/false if you want the group to appear in the navigation bar customization popover by default.
- `representativeItem`: The item to display for the group when space is constrained.
- `items`: The items to include in the group.

## See Also

### Creating a group

- [fixedGroupWithRepresentativeItem:items:](uikit/uibarbuttonitemgroup/fixedgroupwithrepresentativeitem:items:.md)
- [movableGroupWithCustomizationIdentifier:representativeItem:items:](uikit/uibarbuttonitemgroup/movablegroupwithcustomizationidentifier:representativeitem:items:.md)
- [init(barButtonItems:representativeItem:)](uikit/uibarbuttonitemgroup/init(barbuttonitems:representativeitem:).md)
- [init(coder:)](uikit/uibarbuttonitemgroup/init(coder:).md)
