Instance Property


Returns all target objects associated with the control.


var allTargets: Set<AnyHashable> { get }

Return Value

A set of all target objects associated with the control. The returned set may include one or more NSNull objects to indicate actions that are dispatched to the responder chain.

See Also

Accessing the Control’s Targets and Actions

func addTarget(Any?, action: Selector, for: UIControl.Event)

Associates a target object and action method with the control.

func removeTarget(Any?, action: Selector?, for: UIControl.Event)

Stops the delivery of events to the specified target object.

func actions(forTarget: Any?, forControlEvent: UIControl.Event) -> [String]?

Returns the actions performed on a target object when the specified event occurs.

var allControlEvents: UIControl.Event

Returns the events for which the control has associated actions.