rightBarButtonItems
An array of custom bar button items to display on the right (or trailing) side of the navigation bar when the navigation item is the top item.
Declaration
var rightBarButtonItems: [UIBarButtonItem]? { get set }Discussion
This array can contain 0 or more bar button items to display on the right (or trailing) side of the navigation bar. Items are displayed right-to-left in the same order as they appear in the array. Thus, the first item in the array is the rightmost item and other items are added to the left of the previous item. In a right-to-left user interface, the items are automatically flipped.
If there is not enough room to display all of the items in the array, those that would overlap the title view (if present) or the buttons on the left side of the bar are not displayed.
The first item in the array can also be set using the rightBarButtonItem property.