我想禁用单元格交互。在我的功能中:
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
我添加了
Cell.userInteractionEnabled = NO;
并且单元格交互被禁用,但我想保留活动按钮(ButtonLabel)。
Cell.userInteractionEnabled = NO;
Cell.ButtonLabel.userInteractionEnabled = YES;
上面的代码不起作用。这很奇怪,因为 inversly 是可以的:
Cell.userInteractionEnabled = YES;
Cell.ButtonLabel.userInteractionEnabled = NO;
按钮被禁用,但单元格没有。
如何在单元格被禁用时使我的按钮处于活动状态?