Search This Blog

Wednesday 9 April 2014

UIKeyboard notifications Show & Hide - iPhone SDK

This post will help you integrate keyboard     Notifications to handle the show and hide functionality 

Below are two observer which keep listening keyboard actions . You can keep this two observer in viewdidload
OBSERVERS:

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardDidShowNotification object:nil];

   

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardDidHideNotification object:nil];


These are two delegate methods and these will be trigered on keyboard actions.

DELEGATE METHODS:
- (void)keyboardWillShow:(NSNotification*)notification
{
    
}
-(void)keyboardWillHide: (NSNotification*)notification
{
    

}

No comments:

Post a Comment