illyabusigin / CYRKeyboardButton

A drop-in keyboard button that mimics the look, feel, and functionality of the native iOS keyboard buttons
MIT License
351 stars 46 forks source link

UITextView delegate methods not called when keyboard button tapped #1

Closed SquaredTiki closed 10 years ago

SquaredTiki commented 10 years ago

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.

illyabusigin commented 10 years ago

Nice catch! I'll fix this shortly.

illyabusigin commented 10 years ago

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.

SquaredTiki commented 10 years ago

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

illyabusigin commented 10 years ago

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

SquaredTiki commented 10 years ago

Brilliant, thanks!