开发者

Cap duration of UIDatePickerView in mode UIDatePickerModeCountDownTimer?

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜