Skip to content

Commit

Permalink
[Example] [ViewController] [adjustContent(for:)] Fix `bottomLayoutGui…
Browse files Browse the repository at this point in the history
…deTopAndGrowingTextViewBottomVeticalSpaceConstraint.constant`.
  • Loading branch information
ruslanskorb committed Jun 5, 2019
1 parent 71533dd commit e031ed6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ class ViewController: UIViewController {

private func adjustContent(for keyboardRect: CGRect) {
let keyboardHeight = keyboardRect.height
let keyboardYPosition = self.isVisibleKeyboard ? keyboardHeight : 0.0;
self.bottomLayoutGuideTopAndGrowingTextViewBottomVeticalSpaceConstraint.constant = keyboardYPosition
self.bottomLayoutGuideTopAndGrowingTextViewBottomVeticalSpaceConstraint.constant = self.isVisibleKeyboard ? keyboardHeight - self.bottomLayoutGuide.length : 0.0
self.view.layoutIfNeeded()
}

Expand Down

0 comments on commit e031ed6

Please sign in to comment.