iOS: Keyboard close down form objects Swift -
i have login screen controller few form objects. when user click form objects, ios keyboard appearing on login button
and have click other area close keyboard click login button login. how slide these form objects when keyboard appear?
you can set notifications :
[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(keyboardwillshow:) name:uikeyboardwillshownotification object:self.view.window];
and set notification hide keyboard :
[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(keyboardwillhide:) name:uikeyboardwillhidenotification object:self.view.window];
and call these functions , set thing want. move view animation when keyboard shown , move view down animation when keyboard hides. can set these animations using function : animatewithduration
Comments
Post a Comment