버튼을 응답하지 않습니다 viewForRow에서 UIPickerView있는 UIButton은 viewForRow에 응답하지 않습니다
UIView * rowView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 44)] autorelease];
UIButton* deleteButton = [[[UIButton alloc]init]autorelease];
deleteButton.frame = CGRectMake(200, 10, 20,20);
[deleteButton setImage:[UIImage imageNamed:@"IconTrash.png"] forState: UIControlStateNormal];
[deleteButton addTarget: self action:@selector(removeCellAtIndexPath:) forControlEvents: UIControlEventTouchUpInside];
UILabel *labelText = [[UILabel alloc]init];
labelText.text = [NSString stringWithFormat:@"%@",[[localFlagNotes objectAtIndex:row] value]];
labelText.font = [UIFont fontWithName:@"Arial" size: 24];
labelText.frame = CGRectMake(0, 10, 200, 28);
labelText.backgroundColor = [UIColor clearColor];
[rowView addSubview:labelText];
[rowView addSubview:deleteButton];
[labelText release];
return rowView;
removeCellAtIndexPath
버튼을 눌러도 셀이 활성화되지 않는 것 같습니다.
나를 위해 작동하지 않습니다 –