[iOS] Added bottom keyboard inset in Bookmark List

https://jira.mail.ru/browse/MAPSME-15166
This commit is contained in:
Alexander Boriskov 2020-11-20 14:39:44 +03:00 committed by Alexander Boriskov
parent 45e405ee0b
commit cb03658f24

View file

@ -39,6 +39,11 @@ final class BookmarksListViewController: MWMViewController {
self?.presenter.toggleVisibility(in: viewModel)
}
presenter.viewDidLoad()
MWMKeyboard.add(self);
}
deinit {
MWMKeyboard.remove(self);
}
override func viewDidLayoutSubviews() {
@ -215,3 +220,10 @@ extension BookmarksListViewController: BookmarksListInfoViewControllerDelegate {
updateInfoSize()
}
}
extension BookmarksListViewController: MWMKeyboardObserver {
func onKeyboardAnimation() {
let keyboardHeight = MWMKeyboard.keyboardHeight();
tableView.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: keyboardHeight, right: 0)
}
}