How to get second from UIDatePicke?
CGRect pickerFrame = CGRectMake(0, 120, 0, 0);
datePicker = [[UIDatePicker alloc] initWithFrame:pickerFrame];
datePicker.datePickerMode = UIDatePickerModeCountDownTimer;
according to my code i set UIDatePicker to present as UIDatePicker开发者_StackOverflow中文版ModeCountDownTimer mode how can i get the value as minutes from uidatepicker ?
To get the number of seconds that has been selected, do:
NSTimeInterval numberOfSeconds = datePicker.countDownDuration;
Then you can get minutes by dividing by 60.
精彩评论