UIControl

Swift

extension UIControl
  • Searches all targets for control events and returns a target if found.

    @note In most cases UIControlEventTouchUpInside is what you want. Using UIControlEventAll will not give you a result for any control event - this only works with exact matches.

    Declaration

    Swift

    @objc(pspdf_targetForSelector:forControlEvent:)
    func target(for selector: Selector, forControlEvent controlEvent: UIControl.Event) -> Any?