关于整形转字符串保留两位以上说明。例3,显示003等

发布于 2025-07-12 11:18:26

举个例子:

比如 self.duration = 62;

self.timeL.text = [NSString stringWithFormat:@"%.2ld:%.2ld",self.duration/60,self.duration%60];

经过上边的设置self.timeL将显示01:02

0 条评论

发布
问题