我有一个等于我想在 UIAlertView 中插入的文本字段的字符串。
NSString *finalScore = [[NSString alloc] initWithFormat:[counter2 text]];
UIAlertView *myAlertView = [[UIAlertView alloc]
initWithTitle:finalScore
message:@"You scored X points"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"OK", nil];
[myAlertView show];
[myAlertView release];
我想用字符串“finalScore”中的分数替换“X”
我知道如何只使用分数,您只需在消息部分下输入不带引号的字符串名称,但我也希望那里的文本与字符串一起。
非常感谢,蔡斯