次のコードがあります。
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