实例化UIDatePickerd的日期选择控件
UIDatePicker *datePicker = [[UIDatePicker alloc]init];
[self.view addSubview:datePicker];
self.datePicker = datePicker;
// 设置日期选择属性
// 1) 设置显示模式:日期,时间,日期和时间,倒计时
[datePicker setDatePickerMode:UIDatePickerModeDate];
// 2) 设置区域:指定是中国地区
NSLog(@"%@", [NSLocale availableLocaleIdentifiers]);
[datePicker setLocale:[[NSLocale alloc]initWithLocaleIdentifier:@"zh_Hans"]];
// 3) 增加监听方法
[datePicker addTarget:self action:@selector(dateValueChanged:) forControlEvents:UIControlEventValueChanged];