禁用UserInteraction

怎么禁用UITableView单元的UserInteraction,但不是单元中的自定义按钮。

创建按钮:

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?

尝试设置

cell.selectionStyle=UITableViewCellSelectionStyleNone;

响应动作

[dayButton addTarget:self action:@selector(selectDayView:) forControlEvents:UIControlEventTouchUpInside];
    -(void)selectDayView:(id)sender  {
         /////to do ....
    }