自定義按鈕如何禁用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
?