Question

Essayer d'inclure une variable d'instance dans un message que UIAlertView affiche.

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

Cependant, lorsque l'alerte est affichée, aucun message est affiché.

Toutes les idées et l'aide seraient appréciés:)

Sam

Était-ce utile?

La solution

avez-vous essayé avec:

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

au lieu de

(@"You Were Wrong, the correct structure was %@", structureName)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top