我有一个任务需要输入评分(1-5),所以我找到了下面的日期选择器代码,有人可以帮我修改下面的代码,以添加UIPickerView以从1到5选择评分吗?
UIActionSheet *menu = [[UIActionSheet alloc] initWithTitle:@"Ratings"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:nil];
UIDatePicker *pickerView = [[UIDatePicker alloc] init];
pickerView.datePickerMode = UIDatePickerModeDate;
[menu addSubview:pickerView];
[menu showInView:self.view];
[menu sendSubviewToBack:pickerView];
[menu setBounds:CGRectMake(0,0,320, 500)];
CGRect pickerRect = pickerView.bounds;
pickerRect.origin.y = -100;
pickerView.bounds = pickerRect;
[pickerView release];
[menu release];
如何让评分的文本框自动输入UIPickerView中所选值?
谢谢。