I have the following code:
long mins = 02; long secs = 35;
NSString *allTime = [[NSString alloc]init];
allTime = @"%i:%i",mins, secs ;
But it doesn't work, because when I try to display that nsstring object I got this: %i:%i Instead of that I want to get: 02:35
How to do that ? Thank you!
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);
}
TOTAL OF TIME: l
allTimelocal variable and a propertyallTimebelonging to the Playlist class. If that isn't actually the case, you'll need to post your real code with context, because it's fiendishly hard to debug heavily abridged code.