Fixes for null command
This commit is contained in:
@@ -105,7 +105,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
title: "Find on Page",
|
||||
action: #selector(ShortcutResponder.findOnPage)
|
||||
)
|
||||
: UIKeyCommand()
|
||||
: UIKeyCommand.null()
|
||||
),
|
||||
|
||||
// Refresh
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user