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

enter image description here

enter image description here

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

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -