需要算术或指针类型的 uitextfield。
uitextfield where arithmetic or pointer type is required.
我有以下代码并得到如屏幕截图所示的错误。这个错误是什么意思
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if (textField.tag<10) {
if ((textField.text.length >= 1) && (string.length > 0))
{
NSInteger nextText = textField.tag + 1;
// Try to find next responder
UIResponder* nextResponder = [textField.superview viewWithTag:nextText];
if (! nextResponder)
[textField resignFirstResponder];
// nextResponder = [textField.superview viewWithTag:1];
if (nextResponder){
// Found next responder, so set it.
[nextResponder becomeFirstResponder];
UITextField* nextTextfield= (UITextField) [textField.superview viewWithTag:nextText];
[nextTextfield setText:string];
return NO;
}
}
}
return YES;
}
我在以下情况下遇到以下错误。我找不到解决方案
UITextField
应该像这样设置为指针(*
符号):
UITextField* nextTextfield = (UITextField *) [textField.superview viewWithTag:nextText];
我有以下代码并得到如屏幕截图所示的错误。这个错误是什么意思
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if (textField.tag<10) {
if ((textField.text.length >= 1) && (string.length > 0))
{
NSInteger nextText = textField.tag + 1;
// Try to find next responder
UIResponder* nextResponder = [textField.superview viewWithTag:nextText];
if (! nextResponder)
[textField resignFirstResponder];
// nextResponder = [textField.superview viewWithTag:1];
if (nextResponder){
// Found next responder, so set it.
[nextResponder becomeFirstResponder];
UITextField* nextTextfield= (UITextField) [textField.superview viewWithTag:nextText];
[nextTextfield setText:string];
return NO;
}
}
}
return YES;
}
我在以下情况下遇到以下错误。我找不到解决方案
UITextField
应该像这样设置为指针(*
符号):
UITextField* nextTextfield = (UITextField *) [textField.superview viewWithTag:nextText];