自定义按钮如何禁用UserInteraction
为UITableview
细胞,但没有在该单元格的自定义按钮..如何禁用用户交互的UITableView的细胞,但不是在细胞
我创造的一个按钮:
UIButton *dayButton = [UIButton buttonWithType:UIButtonTypeCustom];
[dayButton setFrame:CGRectMake(201, 0, 30, 35)];
[dayButton addTarget:self action:@selector(selectDayView) forControlEvents:UIControlEventTouchUpInside];
[dayButton setBackgroundImage:[UIImage imageNamed:@"86-camera.png"] forState:UIControlStateNormal];
dayButton.userInteractionEnabled=YES;
[cell addSubview:dayButton];
然后我设置
cell.userInteractionEnabled=NO;
我怎样才能得到dayButtonAction
?