Reputation: 545
My Error message:
Request for member "nameField" in something not a struct or union
My Error code:
NSString *msg = nil;
if (nameField.text.length > 0)
msg = [[NSString alloc] initWithFormat:@"Relax, %@, all is good".nameField.text];
else
msg = @"Relax, all is good";
Upvotes: 0
Views: 121
Reputation: 3234
your code line
msg = [[NSString alloc] initWithFormat:
@"You can breathe easy,%@, EveryThing went ok". nameField.text];
try this
msg = [[NSString alloc] initWithFormat:
@"You can breathe easy,%@, EveryThing went ok", nameField.text];
^
change in the line is you have used. instead of comma here -> :@"...",
check if this helps
Upvotes: 1
Reputation: 870
you have a dot (.) where you should have a comma after ok" in the initWithFormat
Upvotes: 0