Попробуйте это.
int time = timeFromApiInSeconds;
int minutes = (time / 60) % 60;
int hours = time / 3600;
if (minutes == 0 && hours == 0){
NSString *lblStr = [NSString stringWithFormat:@"%02d Seconds", time];
}
if (hours == 0){
NSString *lblStr = [NSString stringWithFormat:@"%02d Minutes %02d Seconds", minutes,time];
}
и так ..
Еще один способ сделать это.
NSDate *startDate = [NSDate date];
NSDate *endDate = [NSDate dateWithTimeInterval:(secondsFromApi) sinceDate:startDate];
NSCalendar *gregorian = [[NSCalendar alloc]
initWithCalendarIdentifier:NSGregorianCalendar];
NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;
NSDateComponents *components = [gregorian components:unitFlags
fromDate:startDate
toDate:endDate options:0];
NSInteger years = [components year];
NSInteger months = [components month];
NSInteger days = [components day];
NSInteger minuts = [components minute];
NSLog(@"years = %ld months = %ld days = %ld = %02d Minutes",years,months,days, minuts);
Даже вы можете получить секунды в компонентах.