Messaggi UIAlertView
-
19-09-2019 - |
Domanda
Il tentativo di includere una variabile di istanza in un messaggio che un UIAlertView spettacoli.
lostAlert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:(@"You Were Wrong, the correct structure was %@", structureName) delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
Tuttavia, quando viene visualizzato l'avviso, viene visualizzato alcun messaggio.
Tutte le idee e l'aiuto sarebbe apprezzato:)
Sam
Soluzione
Hai provato con:
[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]
anziché
(@"You Were Wrong, the correct structure was %@", structureName)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow