I use (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)
to perform real-time regex validation on every character input into a UITextView
.
This works well and even handles pasted text that might contain invalid characters.
But Siri doesn't seem to care for such things and dumps its dictation straight into (void)textViewDidChange:(UITextView *)theTextView
, bypassing the shouldChangeTextInRange
delegate and avoiding validation checks.
This seems like a security flaw to me and breaks the API flow that every other input channel follows.
Any thoughts as to how I can get Siri Dictation to comply with calling shouldChangeTextInRange
?
textView:shouldChangeTextInRange:
to be fired, but, as a current solution, you can look intoUITextInput
protocol, it has several dictation-related delegates. – HoneybunchEngineering has determined that your bug report (18866525) is a duplicate of another issue (18306033) and will be closed.
– Corpulence