我正在尝试在警告框中显示多个值,但是dos dos的最后一个似乎显示, 这是我已经有的代码,
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You Lose" message:[NSString stringWithFormat: @"Unlucky you only made it to Level : %d" ,fred,@" and scored %i",score ] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
有人可以建议一个更好的方式来表现吗?
答案 0 :(得分:5)
试试这个:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You Lose" message:[NSString stringWithFormat: @"Unlucky you only made it to Level : %d and scored %i",fred,score ] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];