You can set notifications like this :
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:self.view.window];
and also set notification to hide keyboard like this :
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:self.view.window];
and then call these functions and set any thing you want. Like move the view up animation when keyboard is shown and move the view down animation when keyboard hides. You can set these animations using function : animateWithDuration