Como atribuir ao objeto nsstring um NSString com variáveis?
Eu tenho o seguinte código:
long mins = 02; long secs = 35;
NSString *allTime = [[NSString alloc]init];
allTime = @"%i:%i",mins, secs ;
Mas isso não funciona, porque quando eu tento exibir esse objeto nsstring eu tenho isso:% i:% i Em vez de que eu quero ficar: 02:35
Como fazer isso ? Obrigado!
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 DE TEMPO: l