Fix new crash when closing compose VC (#1018)
This commit is contained in:
parent
75bde8258f
commit
391bc455ea
|
@ -207,8 +207,9 @@ extension ComposeContentViewController {
|
|||
self.tableView.contentInset.bottom = padding - self.view.safeAreaInsets.bottom
|
||||
self.tableView.verticalScrollIndicatorInsets.bottom = padding - self.view.safeAreaInsets.bottom
|
||||
UIView.animate(withDuration: 0.3) {
|
||||
guard let window = self.view.window else { return }
|
||||
// ref: https://developer.apple.com/documentation/uikit/uiresponder/1621578-keyboardframeenduserinfokey
|
||||
let localKeyboardFrame = self.view.convert(endFrame, from: self.view.window!.screen.coordinateSpace)
|
||||
let localKeyboardFrame = self.view.convert(endFrame, from: window.screen.coordinateSpace)
|
||||
let intersection = self.view.bounds.intersection(localKeyboardFrame)
|
||||
if intersection.isEmpty {
|
||||
self.composeContentToolbarViewBottomLayoutConstraint.constant = 0
|
||||
|
|
Loading…
Reference in New Issue