Files
Attractor/App/Utilities/UIKeyCommand+ConvInit.swift

24 lines
542 B
Swift
Raw Normal View History

2020-09-21 18:35:39 -07:00
//
// 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
}
2021-06-10 21:39:32 -07:00
public func prioritizeOverSystem() -> UIKeyCommand {
if #available(iOS 15.0, *) {
self.wantsPriorityOverSystemBehavior = true
}
return self
}
2020-09-21 18:35:39 -07:00
}