Ask you ......
Reply:
I went out of the ......
Reply:
In the click event in TextField, remove the pop-up keyboard, and then on the view to add a TableView DatePicker enough ah.
Reply:
Oh, there are no related articles or examples?
Reply:
I step forward, click TextField, can pop up DatePicker in TextField event in DatePicker can get the value, the question now is how this value to TextField ah? ? ? ?
Here is part of the code:
UIDatePicker * dp;
@ Synthesize dp = _dp;
Here is the cell
tableviewself.dp = [[[UIDatePicker alloc] initWithFrame: CGRectMake (0, 0, 250, 200)] autorelease];
self.dp.datePickerMode = UIDatePickerModeDate;
self.dp.date = [NSDate date];
[Self.dp addTarget: self action: @ selector (changes :) forControlEvents: UIControlEventValueChanged];
self.dp.tag = 101;
cell.inputField.inputView = self.dp;
Here are the events
- (Void) changes: (id) sender {
NSString * str = [NSString stringWithFormat: @ "% @", [self.dateFormat stringFromDate: self.dp.date]];
}
Is how the value of str to the cell
No comments:
Post a Comment