Contents

fulfill(using:)

Supplies a contextual menu configuration to the system.

Declaration

func fulfill(using configuration: UIContextMenuConfiguration?) -> Bool

Parameters

  • configuration:

    The calculated configuration for the contextual menu. Pass nil to cancel menu presentation.

Return Value

true if you fulfill the configuration within the system’s time window; false otherwise.

Discussion

When the system calls your delegate’s contextMenuInteraction(_:configurationForMenuAtLocation:) method to request a menu configuration, return a BEContextMenuConfiguration instance, then call this method as soon as you can to provide the actual configuration. The system times out the request after a short delay to keep the UI responsive.

If you don’t call this method before the timeout, the system discards the contextual menu as if you passed nil. When you fulfill the configuration, your UIContextMenuInteractionDelegate uses the configuration object you supply to configure the contextual menu — not the BEContextMenuConfiguration instance you pass to contextMenuInteraction(_:configurationForMenuAtLocation:).