Signals
Signals copied to clipboard
Expose signal for .primaryActionTriggered (on tvOS)
tvOS makes more extensive use of the .primaryActionTriggered UIControl.Event - this exposes a onPrimaryActionTriggered signal for UIControls - currently on tvOS only.
In theory this action can be used on iOS (I believe pressing the done button on the keyboard triggers this event in text fields for example) as well - but it is only available on iOS versions 9.0 and above and the library currently has a minimum iOS version of 8.0. This in theory could be cleaned up (removing the various #if os(tvOS) compiler conditional bits and returning the eventToKey to not use a closure to initialize) by bumping the min os version. Personally I doubt iOS 8 support has any value - but can't make that call for you.