secondaryButtonSubmenuItems
An array of strings that define the items to display in the secondary button’s submenu.
Declaration
let secondaryButtonSubmenuItems: [String]?Discussion
When you provide this array, the system displays a submenu on secondary button taps. Add up to three array elements that correspond to custom actions your app implements, for example:
“1 more minute”
“15 more minutes”
“1 more hour”
Or, your app might tailor actions for an education app as:
“Finish this lesson.”
“Complete homework.”
“Take a quiz.”
To respond to menu item taps, implement ShieldAction.firstSecondarySubmenuItemPressed, ShieldAction.secondSecondarySubmenuItemPressed, and ShieldAction.thirdSecondarySubmenuItemPressed, depending on the number of elements your app adds to the array.
If you provide nil or an empty array, the secondary button doesn’t display a submenu and instead invokes the ShieldAction.secondaryButtonPressed action when a person presses the secondary button. The system automatically adds a Cancel button to dismiss the menu.