Ios6 当我点击日期选择器的“完成”按钮时,我的文本字段中没有默认日期

Ios6 当我点击日期选择器的“完成”按钮时,我的文本字段中没有默认日期,ios6,Ios6,NSDateFormatter*df=[[NSDateFormatter alloc]init] df.dateStyle = NSDateFormatterMediumStyle; txtSelectNiche.font = [UIFont boldSystemFontOfSize:17.0]; [txtSelectNiche setInputView:(UIView*)[df stringFromDate:datePicker.date]]; txtSelectNiche.text=

NSDateFormatter*df=[[NSDateFormatter alloc]init]

df.dateStyle = NSDateFormatterMediumStyle;


txtSelectNiche.font = [UIFont boldSystemFontOfSize:17.0];

[txtSelectNiche setInputView:(UIView*)[df stringFromDate:datePicker.date]];
txtSelectNiche.text=[NSString stringWithFormat:@“%@”, [df stringFromDate:datePicker.date]]

txtSelectNiche.textAlignment = UITextAlignmentCenter;