当我点击UITableViewCell时,我正试图这样做,其下面的子视图带有UIDatePicker。框架没有调整大小,我不知道如何做到这一点。这是一张照片,你必须向下拖动才能看到UIDatePicker(在时间模式下设置)。
CGRect frame = CGRectMake(0, cell.bounds.size.height, self.view.bounds.size.width, 100);
UIDatePicker *pickerView = [[UIDatePicker alloc] initWithFrame:frame]; // which should be 'now' right?
pickerView.datePickerMode = UIDatePickerModeTime; // which creates just the clock
[pickerView setDate:[NSDate date]];
//[pickerView addTarget:self action:@selector(updateTextField:) forControlEvents:UIControlEventValueChanged];
pickerView.clipsToBounds = YES;
[pickerView setValue:[UIColor whiteColor] forKey:@"textColor"];
[cell addSubview:pickerView];
[self.firstTable sizeToFit];