-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Description
Trying to use this control in a new app that requires Storyboard/Autolayout.
I see you added a 2nd block 'constraintBasedActionHandler' to each method, but I don't see any examples on how to properly use it.
I tried this but the message input view I have never moves:
self.view.addKeyboardPanningWithFrameBasedActionHandler(nil, constraintBasedActionHandler: { [unowned self] (keyboardFrameInView, opening, closing) -> Void in
//self.messageToolbar.bottomConstraint.constant = -keyboardFrameInView.size.height // Also tried this
self.messageToolbar.bottomConstraint.constant = self.view.frame.size.height - keyboardFrameInView.size.height
self.view.updateConstraintsIfNeeded()
self.view.layoutIfNeeded()
})
It does work when I set the frame manually and not use the auto layout constraint, but I am having to many issues with different devices and am trying to steer clear of setting frames directly.
Metadata
Metadata
Assignees
Labels
No labels