ios - Changing tableview height in swift -


i want change tableview when keyboard appears screen in swift. because if don't update height, bottom messages hides under keyboard. here screenshots:

before:

enter image description here

after:

enter image description here

you can see in screenshots, tableview still under keyboard. used following code , didn't work.

    func keyboardwillshow(notification: nsnotification) {         var info = notification.userinfo!         var keyboardframe: cgrect = (info[uikeyboardframeenduserinfokey] as! nsvalue).cgrectvalue()         self.tableview.frame.size.height=self.tableview.frame.size.height-keyboardframe.size.height         self.view.layoutifneeded()         uiview.animatewithduration(0.2) {             self.bottomcons.constant = keyboardframe.size.height //this line textbox , button. unrelated tableview.             self.view.layoutifneeded()         } } 

why tableview height not changing? how can fix it?


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -