草庐IT

UITextinputDelegate

全部标签

ios - dictationRecordingDidEnd 从未调用过

我正在使用UITextView并在我的ViewController中添加了UITextInputDelegate。我已经实现了textDidChange和dictationRecordingDidEnd方法。永远不会调用textDidChange和dictationRecordingDidEnd。请帮忙。在MyViewController.h文件中@interfaceMyViewController:UIViewController{}在MyViewController.m文件中-(void)textDidChange:(id)textInput{}-(void)dictationRe

ios - <UITextinputDelegate> 协议(protocol)实现的问题

我要实现的是一个将单词视为字符的UITextField。具体来说,我试图将数学表达式sin(看作一个字符,例如。我想通过实现我自己的UITextInputDelegate来解决这个问题。但是,当我实现或采用该协议(protocol)时,该协议(protocol)的四个必需函数从未被调用。我尝试通过以下方式实现它:通过子类化UITextField。@interfaceBIDUItextFieldDelegate:UITextField通过子类化NSObject。@interfaceBIDTextfieldInputDelegate:NSObject对应的.m文件包含:@implement