开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜