Post

Replies

Boosts

Views

Activity

Reply to Custom Keyboard Extension - toggle vs collapse
I use this to handle keyboard change and find out if my keyboard is selected .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillChangeFrameNotification)) { _ in if let currentInputMode = UIResponder.currentInputMode { let language = currentInputMode.primaryLanguage if language == "cls" { isPresented = false } } } extension UIResponder { static var currentInputMode: UITextInputMode? { return UIApplication.shared.windows.first?.windowScene?.textInputMode } }
May ’23