Jav*_*eux 16 objective-c uibutton uitableview ios 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无关.
谢谢您的帮助.
Jav*_*eux 33
解决:
[cell.contentView setUserInteractionEnabled: NO];
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
6375 次 |
最近记录: |