/adjust-scrollview-content-inset-based-on-keyboard-frame-viewwillappear.swift
Last active Sep 2, 2017
Adjust Scroll View Content Inset Based on Keyboard Frame
// https://hashaam.com/2017/09/02/adjust-scroll-view-content-inset-based-on-keyboard-frame | |
override func viewWillAppear(_ animated: Bool) { | |
NotificationCenter.default.addObserver(self, selector: #selector(adjustForKeyboardHandler(notification:)), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil) | |
NotificationCenter.default.addObserver(self, selector: #selector(adjustForKeyboardHandler(notification:)), name: NSNotification.Name.UIKeyboardWillHide, object: nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment