尝试在UIAlertView显示的消息中包含实例变量。
lostAlert = [[UIAlertView alloc] initWithTitle:@"Sorry" message:(@"You Were Wrong, the correct structure was %@", structureName) delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
但是,显示警报时,不会显示任何消息。
任何想法和帮助将不胜感激:)
萨姆
答案 0 :(得分:6)
你是否尝试过:
[NSString stringWithFormat:@"You Were Wrong, the correct structure was %@", structureName]
而不是
(@"You Were Wrong, the correct structure was %@", structureName)