Pergunta

Tentando incluir uma variável de instância em uma mensagem que um Shows UIAlertView.

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

No entanto, quando o alerta é mostrada, nenhuma mensagem é mostrada.

Todas as ideias e ajuda seria apreciada:)

Sam

Foi útil?

Solução

que você experimentá-lo com:

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

em vez de

(@"You Were Wrong, the correct structure was %@", structureName)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top