//计算两个时间之间的时间差,结果单位为秒,需要除以60得到分钟数
NSDateFormatter* formater = [[NSDateFormatter alloc] init];
[formater setDateFormat:@"HH:mm:ss"];//根据自己的需求定义格式
NSDate* startDate = [formater dateFromString:"开始时间字符串"];
NSDate* endDate = [formater dateFromString:"结束时间字符串"];
NSTimeInterval time = [endDate timeIntervalSinceDate:startDate];
NSString *timeStr = [NSString stringWithFormat:@"%f",time];
NSLog(@"time=%f",time);
int timeInt = [timeStr intValue]/60;
NSLog(@"%d",timeInt);