我要实现,在scoreString的值是30时,标签会读出"about 30 minutes"。
这是我显示字符串的代码:
NSString *scoreString = [[score objectForKey:@"score"] stringValue];
testLabel.text = scoreString;
需要写出about 和minute两个字符串。
需要创建一个包含所有组件的新字符串:
testLabel.text = [NSString stringWithFormat:@"about %@ minutes", scoreString];