MenuViewControllerDelegate
@objc(PESDKMenuViewControllerDelegate)
public protocol MenuViewControllerDelegate : AnyObject
The MenuViewControllerDelegate
defines methods that allow you to respond to messages from
the MenuViewController
.
-
Called when a menu item was selected.
Declaration
Swift
func menuViewController(_ menuViewController: MenuViewController, didSelect menuItem: MenuItem)
Parameters
menuViewController
The menu view controller that the item was selected in.
menuItem
The menu item that was selected.
-
Called when a menu item was deselected.
Declaration
Swift
func menuViewController(_ menuViewController: MenuViewController, didDeselect menuItem: MenuItem)
Parameters
menuViewController
The menu view controller that the item was deselected in.
menuItem
The menu item that was deselected.
-
Called when a menu item is about to be shown.
Declaration
Swift
func menuViewController(_ menuViewController: MenuViewController, willShow menuItem: MenuItem, in cell: UICollectionViewCell, at index: Int)
Parameters
menuViewController
The menu view controller that the item will be shown in.
menuItem
The menu item that will be shown.
cell
The cell that the menu item will be shown in.
index
The index of this cell with its section.
-
Called when a menu item should be moved as the result of interactive reordering.
Declaration
Swift
func menuViewController(_ menuViewController: MenuViewController, move menuItem: MenuItem, from previousMenuItems: [MenuItem], to menuItems: [MenuItem])
Parameters
menuViewController
The menu view controller that the item will be moved in.
menuItem
The menu item that was moved.
previousMenuItems
The array of menu items prior to the move.
menuItems
The array of menu items after the move.