NSString *str_hour = [NSString stringWithFormat:@"%d",time/60];
NSString *str_minute = [NSString stringWithFormat:@"%02d",time%60];
return [NSString stringWithFormat:@"%@'%@"",str_hour,str_minute];
如果stringWithFormat有特色字符需要加\,int类型可以加01,02来显示几位证书
NSString *str_hour = [NSString stringWithFormat:@"%d",time/60];
NSString *str_minute = [NSString stringWithFormat:@"%02d",time%60];
return [NSString stringWithFormat:@"%@'%@"",str_hour,str_minute];
如果stringWithFormat有特色字符需要加\,int类型可以加01,02来显示几位证书
本文标题:NSString的用法
本文链接:https://www.haomeiwen.com/subject/egjxhxtx.html
网友评论