因此,我在这里将工作的 ios 6 应用程序升级到 ios7,现在我无法在 uitableviewcells 内的自定义按钮(或其他子视图)上接收点击或其他操作。
Edit:
My code:
这是我部署 PlaceCell 的位置
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"PlaceCell";
PlaceCell *cell = [tableView dequeueReusableCellWithIdentifier: cellIdentifier];
if (!cell) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"PlaceCell" owner:self options:nil];
cell = [nib lastObject];
cell.reuseIdentifier = cellIdentifier;
}
[cell configureCellWithPlace: [self.places objectAtIndex:indexPath.row]];
cell.delegate = self;
cell.userInteractionEnabled = YES;
return cell;
}
然后它是一个带有按钮的普通自定义单元,这些按钮通过界面连接到某些操作。
它在iOS6上完美运行,但在iOS7上却不起作用。
感谢您的帮助。
解决方法:
[cell.contentView setUserInteractionEnabled: NO];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)