我添加一个UIDatePicker
作为输入视图UITextField
UIDatePicker *oBirth;
NSDateFormatter *dateFormat;
_editingField = [[UITextField alloc] initWithFrame : CGRectMake(80, 12, 215, 25)];
dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat : @"dd/MM/yyyy"];
oBirth = [[UIDatePicker alloc] initWithFrame : CGRectMake(0, 0, 120, 45)];
oBirth.date = [dateFormat dateFromString : sField];
NSLog(@"%@", oBirth.subviews);
[oBirth addTarget : self
action : @selector(updateDate:)
forControlEvents : UIControlEventValueChanged];
[oBirth addTarget : self
action : @selector(dismissDate:)
forControlEvents : UIControlEventTouchUpOutside];
[oBirth setDatePickerMode : UIDatePickerModeDate];
_editingField.tag = 1;
_editingField.inputView = oBirth;
如何在UIDatePicker
不创建不可见视图的情况下解雇?