mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-11 19:35:32 +00:00
Remove unneeded code to find first responder
This commit is contained in:
parent
3920a5ea60
commit
b7903dc2f7
2 changed files with 2 additions and 16 deletions
|
|
@ -275,7 +275,7 @@ public class KeyboardPickerViewController: UITableViewController, UIAlertViewDel
|
|||
// Add keyboard.
|
||||
Manager.shared.addKeyboard(withID: kbID, languageID: langID, keyboardName: kbName,
|
||||
languageName: langName, isRTL: isRTL, isCustom: false, font: font,
|
||||
oskFont: oskFont)
|
||||
oskFont: oskFont)
|
||||
Manager.shared.setKeyboard(withID: kbID, languageID: langID, keyboardName: kbName,
|
||||
languageName: langName, font: font, oskFont: oskFont)
|
||||
navigationController?.popToRootViewController(animated: true)
|
||||
|
|
|
|||
|
|
@ -7,9 +7,7 @@
|
|||
//
|
||||
|
||||
import CoreText
|
||||
import Foundation
|
||||
import ObjectiveC
|
||||
import QuartzCore
|
||||
import UIKit
|
||||
import WebKit
|
||||
|
||||
typealias FetchKeyboardsBlock = ([String: Any]?) -> Void
|
||||
|
|
@ -693,18 +691,6 @@ UIGestureRecognizerDelegate {
|
|||
/// - SeeAlso:
|
||||
/// KeymanTextView/KeymanTextField to enable/disable the keyboard picker
|
||||
public func showKeyboardPicker(in viewController: UIViewController, shouldAddKeyboard: Bool) {
|
||||
if UIDevice.current.userInterfaceIdiom == .pad {
|
||||
// TODO fix since private API
|
||||
/*
|
||||
let firstResponder = UIApplication.shared.keyWindow?.findFirstResponder()
|
||||
if let firstResponder = firstResponder as? KeymanTextView {
|
||||
firstResponder.dismissKeyboard()
|
||||
} else if let firstResponder = firstResponder as? KeymanTextField {
|
||||
firstResponder.dismissKeyboard()
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
let vc = KeyboardPickerViewController()
|
||||
let nc = UINavigationController(rootViewController: vc)
|
||||
nc.modalTransitionStyle = .coverVertical
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue