我有以下代码:
long mins = 02; long secs = 35;
NSString *allTime = [[NSString alloc]init];
allTime = @"%i:%i",mins, secs ;
但它不起作用,因为当我尝试显示那个 nsstring 对象时,我得到了这个:%i:%i 而不是我想要得到的:02:35
怎么做 ?谢谢!
allTime = [NSString stringWithFormat:@"%l/%l", mins, secs];
for(Playlists *thePL in collection)
{
NSLog(@"===NEXT PLAYLIST===");
NSLog(@"Name: %@", thePL.namePL);
NSLog(@"Quantity of songs: %i", thePL.entries);
NSLog(@"Total of time: %@",thePL.allTime);
}
总时间: l