我该如何纠正此警告?
|
我在搜索数字键盘的“完成”按钮,然后看到了这个问题:
如何在iPhone数字键盘上显示“完成”按钮
我将Archie的答案代码复制到了我的代码中,并在此区域收到2条警告:
- (void)textFieldDidBeginEditing:(NSNotification *)note {
[self updateKeyboardButtonFor:[note object]];
}
- (void)keyboardWillShow:(NSNotification *)note {
[self updateKeyboardButtonFor:[self findFirstResponderTextField]];
}
- (void)keyboardDidShow:(NSNotification *)note {
[self updateKeyboardButtonFor:[self findFirstResponderTextField]];
}
警告是:
不兼容的Objective-C类型初始化\'struct NSNotification * \',预期\'struct UITextField * \'
我该如何纠正?我尝试使用UITextField进行切换,但一切都搞砸了
没有找到相关结果
已邀请:
2 个回复
镰茧钩
然后在成为文本字段的委托的同时编辑make
方法,
或者,用其他合适的方法名称重命名
的出现
凡夕
不是通知,它是委托方法。预期签名为