我正在寻找的数字键盘一个完成按钮,然后我看到了这个问题:我如何纠正这个警告?
How to show "Done" button on iPhone number pad
我复制阿奇的答案代码到我的,我得到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类型初始化 '结构NSNotification *',预期 '结构的UITextField *'
我该如何纠正?我试图用UITextField进行切换,但它全部搞砸了
这就是为什么你不只是复制和粘贴代码。 – BoltClock 2011-06-14 16:54:08
我没有,我检查了代码,但我没有发现错误。这可能是我的新语言.. – Phillip 2011-06-14 16:58:25