mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 12:46:58 +02:00
Make KeyboardAvoider respect to safe area insets
This commit is contained in:
@@ -94,7 +94,7 @@ final class KeyboardAvoider: NSObject {
|
||||
let keyboardFrameInView = view.convert(keyboardFrame, from: nil)
|
||||
|
||||
// Find how much the keyboard overlaps the scroll view
|
||||
let scrollViewBottomInset = scrollView.frame.maxY - keyboardFrameInView.origin.y
|
||||
let scrollViewBottomInset = max(scrollView.frame.maxY - keyboardFrameInView.origin.y - view.safeAreaInsets.bottom, 0)
|
||||
|
||||
UIView.animate(withDuration: animationDuration,
|
||||
delay: 0.0,
|
||||
|
||||
Reference in New Issue
Block a user