IdleHandsApps/IHKeyboardAvoiding

keyboardavoiding doesnt work when we pop back to previous viewcontroller

Closed this issue · 4 comments

Hi,
The keyboard avoiding doesnt work if user pops back to previous screen using navigation pop viewcontroller.

same problem

func setupLayout(){
    KeyboardAvoiding.paddingForCurrentAvoidingView = 0
    KeyboardAvoiding.avoidingView = self.lastView
}

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(true)
    setupLayout()

}

There is only ever one avoidingView so if you change it you have to change it back. I suggest setting it in viewDidAppear if this is whats happening

Hi even if there is only one avoidingView and I set the
KeyboardAvoiding.avoidingView = self.lastView
When we present view controller and go back to previous screen by using swipe down gesture recently introduced by Apple, its stop responding. And as viewDidAppear method is not called or any of view method is not called. so what do you suggest?