Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support UIScrollViewKeyboardDismissModeInteractive? #23

Closed
beamercola opened this issue Dec 22, 2013 · 9 comments
Closed

How to support UIScrollViewKeyboardDismissModeInteractive? #23

beamercola opened this issue Dec 22, 2013 · 9 comments

Comments

@beamercola
Copy link

Dragging down separates the box from the keyboard. Is there any way to live-update the frame of this?

ios simulator screen shot dec 21 2013 10 33 12 pm

@fphilipe
Copy link
Owner

To be honest, I've never even heard of UIScrollViewKeyboardDismissModeInteractive. I guess you could add a keyboard accessory view and use KVO on its frame to get notified of the new position. Hope this helps.

@wdeng
Copy link

wdeng commented Dec 22, 2013

DismissModeInteractive can be seen in the Attributes Inspector of scollView, basically is to panning down the keyboard.
cac6991f9ca891c099ec0590ade3678a
However, I tried to inspect the frame of InputAccessoryView. The frame is within keyboard's bound, so it never changes.

@wdeng
Copy link

wdeng commented Dec 22, 2013

Sorry, just found out you can use converPoint:toView: ...

@beamercola
Copy link
Author

Interesting, could you provide an example? having a hard time wrapping my head around it

@luohui8891
Copy link

Hi, same problem. Which notification of system can be observed the keyboards frame changing in the animation?

@fphilipe
Copy link
Owner

@luohui8891 Use KVO on the accessory view's frame and then, as @inskyder said, use convertPoint:toView:.

@luohui8891
Copy link

@fphilipe , got it. Thank you.

@rudensm
Copy link

rudensm commented Dec 30, 2013

I suggest to use https://github.com/danielamitay/DAKeyboardControl instead of UIScrollViewKeyboardDismissModeInteractive. It has much easier interface and additionally you can set there a keyboardTriggerOffset property.

@wdeng
Copy link

wdeng commented Dec 30, 2013

According to the visual animation of Facebook Messenger, I guess what they use is something like DAkeyboard or get the keyboard frame as accessory view's superview and modify it with input textView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants