Question

Trying to include a instance variable in a message that a UIAlertView Shows.

lostAlert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:(@"You Were Wrong, the correct structure was %@", structureName)  delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];

however, when the Alert is shown, no message is shown.

Any ideas and help would be appreciated :)

Sam

Was it helpful?

Solution

did you try it with:

[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]

instead of

(@"You Were Wrong, the correct structure was %@", structureName)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top