I'm working on iOS 8 custom keyboard extension right now, and there are some issues that I cannot figure out.
First, I think the UITextInputDelegate
Methods are not working as I expected.
Does this sound right: selectionWillChange:
and selectionDidChange:
methods should be called when user long-presses typing area? And textWillChange:
and textDidChange:
methods should be called whenever the text is literally changing?
Actually, what I observed is that, when I changed selection in text input area, textWillChange:
and textDidChange:
are called, and I cannot get a clue that the other two methods are called in what condition. If anyone knows about the usage of these delegate methods, please let me know.
Second, I know the playInputClick:
method can be used to virtualize keyboard click sound in custom keyboard. As this is applicable in a normal situation, I found it impossible to apply in iOS 8 custom keyboard extension. My app consists of one keyboard view controller, and custom view that subclasses UIView is added to this view controller. My approach is that UIInputViewAudioFeedback
delegate is declared in this custom view, enableInputClicksWhenVisible method is returning YES
, class method that calls [[UIDevice currentDevice] playInputClick]
is set, then this method is called wherever the keyboard sound is needed: which is not working at all.
Is my approach is wrong in any way? If anyone has succeeded in using playInputClick
method, please share your wisdom.
Thank you