¿Cómo asignar al objeto nsstring una NSString con variables?
Tengo el siguiente código:
long mins = 02; long secs = 35;
NSString *allTime = [[NSString alloc]init];
allTime = @"%i:%i",mins, secs ;
Pero no funciona, porque cuando intento mostrar ese objeto nsstring obtuve esto:% i:% i En lugar de eso quiero obtener: 02:35
Como hacer eso ? ¡Gracias!
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 DEL TIEMPO: l