init(barButtonItems:representativeItem:)
Creates a fixed group with the specified items.
Declaration
init(barButtonItems: [UIBarButtonItem], representativeItem: UIBarButtonItem?)Parameters
- barButtonItems:
The bar button items to display on the bar. Typically, the items in a group are related to each other in some way, although that need not be the case. You must not specify an empty array.
- representativeItem:
A bar button item to display when there isn’t enough room to display the items in
barButtonItems. The object you specify must be distinct from the objects in thebarButtonItemsparameter. It’s a programmer error to specify an object that’s also in the array passed to thebarButtonItemsparameter. You may specifynilfor this parameter.
Return Value
An initialized bar button item group.
Discussion
When you use this initializer to create a group for a navigation bar, it produces the same result as fixedGroup(representativeItem:items:) (Swift) or fixedGroupWithRepresentativeItem:items: (Objective-C).
When you use this initializer to create a group for the shortcuts bar, use the resulting group object to configure the leadingBarButtonGroups or trailingBarButtonGroups property of a UITextInputAssistantItem object.