Skip to content

Instantly share code, notes, and snippets.

@matkuznik
Created May 18, 2021 13:14
Show Gist options
  • Save matkuznik/7f9d8705a4a64e06d7e298eeb58b22b3 to your computer and use it in GitHub Desktop.
Save matkuznik/7f9d8705a4a64e06d7e298eeb58b22b3 to your computer and use it in GitHub Desktop.
let windowSafeArea: CGFloat = windowsSafeAreaWereAdded ? 0 : viewController.view.safeAreaInsets.bottom - viewController.additionalSafeAreaInsets.bottom
viewController.additionalSafeAreaInsets.bottom += beginKeyboardBounds.origin.y - endKeyboardBounds.origin.y - windowSafeArea
windowsSafeAreaWereAdded = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment