-(void) Viewdidload
{
[Super Viewdidload];
//Increase monitoring to receive messages when the keyboard appears or changes
[[nsnotificationcenter defaultcenter] addobserver: Self
selector:@selector (keyboardwillshow:)
Name:uikeyboardwillshownotification
object:nil];
//increased monitoring, when the key exits when the message is received
[[nsnotificationcenter defaultcenter] addobserver: Self
selector:@selector (keyboardwillhide:)
Name:uikeyboardwillhidenotification
object:nil];
}
Called when the keyboard appears or changes
-(void) Keyboardwillshow: (nsnotification *) anotification
{
//Get the height of the keyboard
nsdictionary *userinfo = [anotification userInfo];
Nsvalue *avalue = [UserInfo objectforkey: Uikeyboardframeenduserinfokey];
cgrect keyboardrect = [Avalue cgrectvalue];
int height = keyboardrect. size. height;
}
Called when the key exits
-(void) Keyboardwillhide: (nsnotification *) anotification
{
}