- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ UIDatePicker *datePicker = [[UIDatePicker alloc] init]; [datePicker setDate:[EPC_Date getNSDate: textField.text] animated:YES]; datePicker.datePickerMode = UIDatePickerModeDate; //UITextField的inputView属性代替标准的系统键盘 textField.inputView = datePicker;//inputView相当于给弹出datePicker控件动画的功能;定制键盘来使用datePicker,弹出datePicker与弹出键盘方式一样 [datePicker release]; return YES;
UIPickerView 和 UITextField 键盘的混搭使用
最新推荐文章于 2019-08-19 17:40:30 发布