views:

47

answers:

1

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

+2  A: 

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)
Vincent Osinga
worked a treat.. thanks!:)
Sam Jarman