fix for iOS 15 fullscreen mode not working

This commit is contained in:
Mauro Romito
2022-11-30 13:27:07 +01:00
parent c897cef78d
commit a7953c092b
3 changed files with 13 additions and 4 deletions
+9 -1
View File
@@ -177,7 +177,15 @@ extension RoomViewController {
optionalTextView?.becomeFirstResponder()
originalRect = wysiwygInputToolbar.convert(wysiwygInputToolbar.frame, to: view)
}
wysiwygInputToolbar.showKeyboard()
// This tirggers a SwiftUI update that is handled correctly on iOS 16, but needs to be dispatchted async on older versions
// Dispatching on iOS 16 instead causes some weird SwiftUI update behaviours
if #available(iOS 16, *) {
wysiwygInputToolbar.showKeyboard()
} else {
DispatchQueue.main.async {
wysiwygInputToolbar.showKeyboard()
}
}
roomInputToolbarContainer.removeFromSuperview()
let dimmingView = UIView()
dimmingView.translatesAutoresizingMaskIntoConstraints = false