I need users to be able to select a duration, which it looks like UIDatePickerModeCountDownTimer
is made for, but I want to cap it at, say, three hours, which it looks like it isn't.
Can I do this with UIDatePicker
, or would I be better off cr开发者_高级运维eating a custom two-column UIPickerView
?
Hope this helps..
[pkrTime setMinuteInterval:3];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MM-dd-yyyy hh:mm:ss"];
NSDate *defaultDate = [dateFormatter dateFromString:@"01-01-2000 00:03:00"];
[dateFormatter release];
[pkrTime setMinimumDate:defaultDate];
精彩评论