我的错误消息:
Request for member "nameField" in something not a struct or union
我的错误代码:
NSString *msg = nil;
if (nameField.text.length > 0)
msg = [[NSString alloc] initWithFormat:@"Relax, %@, all is good".nameField.text];
else
msg = @"Relax, all is good";
最佳答案
你的代码行
msg = [[NSString alloc] initWithFormat:
@"You can breathe easy,%@, EveryThing went ok". nameField.text];
试试这个
msg = [[NSString alloc] initWithFormat:
@"You can breathe easy,%@, EveryThing went ok", nameField.text];
^
更改的行是你已经使用过的。此处不用逗号 -> :@"...",
检查这是否有帮助
关于ios - 请求非结构或联合 :error 中的成员 "nameField",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9971296/