Fixes for null command

This commit is contained in:
James Magahern
2022-03-29 17:27:07 -07:00
parent cc6b25aab0
commit d9658508cc
4 changed files with 12 additions and 8 deletions

View File

@@ -7,7 +7,15 @@
import UIKit
extension NSObject {
@objc fileprivate func _null() {}
}
extension UIKeyCommand {
public static func null() -> UIKeyCommand {
UIKeyCommand(modifiers: [], input: "", title: "", action: #selector(_null))
}
convenience init(modifiers: UIKeyModifierFlags, input: String, title: String, action: Selector) {
self.init(input: input, modifierFlags: modifiers, action: action)
self.title = title