before iOS 16 I could present a UIViewController over the keyboard without having it close, by using this code:
if let window = UIApplication.shared.windows.last,
String(describing: type(of: window)).equals("UIRemoteKeyboardWindow") {
let presentingVC = window.rootViewController
presentingVC.present(self.myViewController, animated: animated)
}
I tried running this code in the emulator, emulating iOS 16 on an iPhone 13.
Unfortunately, running this code with the keyboard open (as before), "UIRemoteKeyboardWindow" is no longer present among the windows.
I only found "UITextEffectsWindow", but presenting "myViewController" from there it is displayed under the keyboard.
Has anyone experienced this problem and knows how to start a UIViewController over the keyboard without having it close?
I need this code mainly because I have custom pickers that allow the user to enter values that update the UI without the keyboard being closed.
UPDATE:
I built and run the app from the current stable Xcode Version (13.4.1) on iPhone 13 simulator with iOS 16 and now I'm able to find UIRemoteKeyboardWindow. I used to start the app from Xcode versions 14 beta. Can not finding UIRemoteKeyboardWindow be an error due to Xcode beta versions?