您的位置:首页 > 移动开发 > IOS开发

iOS: NSString的方法initWithFormat:locale:arguments:

2013-09-12 22:07 477 查看
- (id)initWithFormat:(NSString *)format locale:(id)locale
arguments:(va_list)argList

va_list myArgs;

 

NSString *myString = [[NSString alloc] initWithFormat:@"%@:  %d\n"

        locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]

        arguments:myArgs];

The resulting string has the value “Cost: 32\n”.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息