Pregunta

Tratando de incluir una variable de instancia en un mensaje que muestra una UIAlertView.

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

Sin embargo, cuando se muestra la alerta, no se muestra ningún mensaje.

Todas las ideas y ayuda se agradece:)

Sam

¿Fue útil?

Solución

¿trató con:

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

en lugar de

(@"You Were Wrong, the correct structure was %@", structureName)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top