First, add a method that listens to value changes in the date picker itself:
[datePicker addTarget:self action:@selector(datePickerDateChanged:) forControlEvents:UIControlEventValueChanged];
Then, in the method, compare the date of the date picker with the min or max date:
- (void)datePickerDateChanged:(UIDatePicker*)picker {
if ([picker.date compare:picker.maximumDate] == NSOrderedSame) {
// max
} else if ([picker.date compare:picker.minimumDate] == NSOrderedSame) {
// min
}
}
Hope that hepls. Good luck!