【发布时间】:2020-09-07 05:09:53
【问题描述】:
我创建了一个自定义 UIControl。最接近的比较是 UIStepper,但它是 UIControl 的子类,因为它完全是自定义的。
对于大多数 UIControls,您可以使用 primaryActionTriggered 创建目标操作,以避免需要知道哪些操作很重要。我想为我的自定义 UIControl 提供同样的便利。那么如何将UIControl.Event.valueChanged 映射到UIControl.Event.primaryActionTriggered?
【问题讨论】:
标签: uikit uicontrol uicontrolevents target-action