Initializes and returns a bar button item group with the specified items.


init(barButtonItems: [UIBarButtonItem], representativeItem: UIBarButtonItem?)



The bar button items to display on the shortcuts 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.


A bar button item to display when there is not enough room to display the items in barButtonItems. The object you specify must be distinct from the objects in the barButtonItems parameter. It is a programmer error to specify an object that is also in the array passed to the barButtonItems parameter. You may specify nil for this parameter.

Return Value

An initialized bar button item group.


Use the resulting group object to configure the leadingBarButtonGroups or trailingBarButtonGroups property of a UITextInputAssistantItem object.

See Also

Initializing a Bar Button Item Group