Contents

addAction(_:for:)

Adds the UIAction to a given event. UIActions are uniqued based on their identifier, and subsequent actions with the same identifier replace previously added actions. You may add multiple UIActions for corresponding controlEvents, and you may add the same action to multiple controlEvents.

Declaration

func addAction(_ action: UIAction, for controlEvents: UIControl.Event)

See Also

Managing the control’s targets and actions