I have this code that can push everything up in my view controller when the keyboard displays. However, it doesn't work with auto layout. Can I adapt this code to work with my constraints or is there a better method to move textfields and buttons up so that the keyboard doesn't hide them? Thanks.
func keyboardWillShow(sender: NSNotification) {
self.view.frame.origin.y -= 150
}
func keyboardWillHide(sender: NSNotification) {
self.view.frame.origin.y += 150
}