小编Jav*_*eux的帖子

XIB中用作Custom UITableViewCell的自定义按钮不响应tap(ios7)

所以我在这里将ios6应用程序升级到ios7,现在我无法在tableviewcells中的自定义按钮(或其他子视图)上接收点击或其他操作.

编辑:

我的代码:

这是我部署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;
}
Run Code Online (Sandbox Code Playgroud)

然后它是一个普通的自定义单元格,其按钮通过界面连接到某些操作.它与iOS6完美配合,但它与iOS7无关.

谢谢您的帮助.

objective-c uibutton uitableview ios ios7

16
推荐指数
1
解决办法
6375
查看次数

标签 统计

ios ×1

ios7 ×1

objective-c ×1

uibutton ×1

uitableview ×1