//传入 秒 得到 xx分钟xx秒
totalTime=[NSString stringWithFormat:@"%@",mm.fileDuration];
NSInteger seconds = [totalTime integerValue];
//format of minute
NSString *str_minute = [NSString stringWithFormat:@"%ld",seconds/60];
//format of second
NSString *str_second = [NSString stringWithFormat:@"%ld",seconds%60];
//format of time
NSString *format_time = [NSString stringWithFormat:@"%@:%@",str_minute,str_second];
cell.TimeLab.text=[NSString stringWithFormat:@"%@", format_time];
ios 秒换时间格式
最新推荐文章于 2023-10-08 11:05:24 发布