0

试图在 UIAlertView 显示的消息中包含实例变量。

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

但是,当显示警报时,不会显示任何消息。

任何想法和帮助将不胜感激:)

山姆

4

1 回答 1

6

您是否尝试过:

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

代替

(@"You Were Wrong, the correct structure was %@", structureName)
于 2009-12-16T10:37:13.833 回答