NSString *start = @"2016-2-2 08:00";
NSString *end = @"2016-2-2 20:00";
NSTimeInterval interval = 30;
NSMutableArray *arr = [CuttingDateTool GetAppointTimeWithStartTime:start endTime:end intervalTime:interval];
NSLog(@"%@",arr);
_pickerVC = [[TimePickerViewController alloc] init];
[_pickerVC.view setFrame:CGRectMake(0, [UIScreen mainScreen].bounds.size.height - 250, [UIScreen mainScreen].bounds.size.width,250)];
//这是根据我自己项目的需求定义的,你们可以自己改,最重要的是CuttingDateTool 这个类 可以多看看
_pickerVC.yuYueTime = start; //预约的时间
_pickerVC.todayPsTime_early = start;//最早营业时间
_pickerVC.todayPsTime_last = end;//最晚营业时间
_pickerVC.todayIsOpen = YES; //今天是否营业
_pickerVC.tomorrowIsOpen = YES;//明天是否营业
[self.view addSubview:_pickerVC.view];