Я получаю строку из JSONC api YouTube, но продолжительность идет как полный номер i.e 2321 вместо 23:21 или 2 вместо 0:02. Как я могу это исправить?
EDIT:
int duration = [videos valueForKey:@"duration"];
int minutes = duration / 60;
int seconds = duration % 60;
NSString *time = [NSString stringWithFormat:@"%d:%02d", minutes, seconds];