illyabusigin / CYRKeyboardButton

A drop-in keyboard button that mimics the look, feel, and functionality of the native iOS keyboard buttons

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UITextView delegate methods not called when keyboard button tapped

SquaredTiki opened this issue · comments

UITextView delegate methods such as textView:shouldChangeTextInRange:replacementText: and textViewDidChange: are not called for inputs made through the keyboard buttons.

Looks like this is because calling insertText: on the text view will not call delegate methods.

Nice catch! I'll fix this shortly.

I just tried this out and it looks like textViewDidChange: and textViewDidChangeSelection: are getting called. textView:shouldChangeTextInRange:replacementText: was not getting called. Can you confirm? Tested in iOS 7.1 simulator.

I can confirm. Indeed only seems to be textView:shouldChangeTextInRange:replacementText: not getting called.

I'll push a revision release via CocoaPods later on today that resolves this issue.

Brilliant, thanks!