From 14f555f82f2448070e599608bf77c871f853bc7d Mon Sep 17 00:00:00 2001 From: CMK Date: Tue, 22 Jun 2021 17:10:21 +0800 Subject: [PATCH] fix: add animation for footer when keyboard display --- Mastodon/Scene/Report/ReportViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Mastodon/Scene/Report/ReportViewController.swift b/Mastodon/Scene/Report/ReportViewController.swift index b0c6ddcc..5e81ba13 100644 --- a/Mastodon/Scene/Report/ReportViewController.swift +++ b/Mastodon/Scene/Report/ReportViewController.swift @@ -222,10 +222,16 @@ class ReportViewController: UIViewController, NeedsDependency { let padding = contentFrame.maxY - endFrame.minY guard padding > 0 else { self.bottomConstraint.constant = 0.0 + UIView.animate(withDuration: 0.33) { + self.view.layoutIfNeeded() + } return } self.bottomConstraint.constant = padding + UIView.animate(withDuration: 0.33) { + self.view.layoutIfNeeded() + } }) .store(in: &disposeBag) }