Pick month from a list in UITableViewCell?
What's the best way for me to allow the user to pick a month from a UITableViewCell? UIPickerView requires the height to be very large which makes it look ugly..What are some other options? I don't want to pu开发者_JAVA技巧t a text field there and manually make the user enter a month.. Thanks.
UIDatePicker *datePicker = [[UIDatePicker alloc] init];
datePicker.datePickerMode = UIDatePickerModeDate;
[datePicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged];
datePicker.tag = indexPath.row;
textField.delegate= self;
textField.inputView = datePicker; // Now the Keyboard will not appear //
[datePicker release];
精彩评论