24 lines
542 B
Swift
24 lines
542 B
Swift
//
|
|
// UIKeyCommand+ConvInit.swift
|
|
// App
|
|
//
|
|
// Created by James Magahern on 9/21/20.
|
|
//
|
|
|
|
import UIKit
|
|
|
|
extension UIKeyCommand {
|
|
convenience init(modifiers: UIKeyModifierFlags, input: String, title: String, action: Selector) {
|
|
self.init(input: input, modifierFlags: modifiers, action: action)
|
|
self.title = title
|
|
}
|
|
|
|
public func prioritizeOverSystem() -> UIKeyCommand {
|
|
if #available(iOS 15.0, *) {
|
|
self.wantsPriorityOverSystemBehavior = true
|
|
}
|
|
|
|
return self
|
|
}
|
|
}
|