ios - UINavigationController in UITabBarController has a gap between the bottom of the view and keyboard -


i have uitabbarcontroller has uinavigationcontrollers it's tabs.

when keyboard opens up, there strange gap between bottom of view , keyboard. checked constraints , fine.

i have different viewcontroller has uitextview , doesn't show gap between it.

here code adds keyboard height bottom constraint scrolls correctly , nothing gets hidden:

func setupkeyboardobserver() {     nsnotificationcenter.defaultcenter().addobserver(self, selector: selector("keyboardwasshown:"), name:uikeyboardwillshownotification, object: nil)     nsnotificationcenter.defaultcenter().addobserver(self, selector: selector("keyboardwillhide:"), name:uikeyboardwillhidenotification, object: nil) }  func keyboardwasshown(notification: nsnotification) {     let info = notification.userinfo!     let keyboardframe: cgrect = (info[uikeyboardframeenduserinfokey] as! nsvalue).cgrectvalue()      uiview.animatewithduration(0.1, animations: { () -> void in         self.bottomconstraint.constant = keyboardframe.size.height     }) }  func keyboardwillhide(notification: nsnotification) {     var info = notification.userinfo!     var keyboardframe: cgrect = (info[uikeyboardframeenduserinfokey] as! nsvalue).cgrectvalue()      uiview.animatewithduration(0.1, animations: { () -> void in         self.bottomconstraint.constant = 0     }) } 

enter image description here

enter image description here


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -