Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class ViewController:UIViewController, KeyboardObserver{
//@IBOutlet weak var scrollViewOutlet:UIScrollView!
var container:UIView{
return self.view
//If container is a scrollview, create an outlet for scrollview and return it like below
//return self.scrollViewOutlet
//Register for Keyboard Notifications
override func viewWillAppear(_ animated: Bool) {
KeyboardNotifications(shouldRegister: true)
//Deregister for keyboard Notifications
override func viewWillDisappear(_ animated: Bool) {
KeyboardNotifications(shouldRegister: false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment