ios - UITableViewCell。如何在着陆期间突出显示单元格?

标签 ios uitableview custom-cell

我有一个自定义的 tableViewCell。我想通过突出显示来指示用户触摸。单元格选择样式为 UITableViewCellSelectionStyleBlue。在父 Controller 中,我设置了 self.clearsSelectionOnViewWillAppear = YES

我应该可以走了。没有。选择仍然粘在单元格上。我想要的是仅在触地期间的选择指示。修饰后外观应立即恢复为未选择的外观。

我该怎么做?

干杯,
道格

最佳答案

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{

    [tableView deselectRowAtIndexPath:indexPath animated:YES];

}

关于ios - UITableViewCell。如何在着陆期间突出显示单元格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10401949/

相关文章:

ios - UIImagePickerController 在 alloc/init 上崩溃

ios - 如何在 iOS 中获取位置提供者名称?

ios - 是否可以调用super tableView : didSelectRowAtIndexPath: in a custom subclass?

objective-c - iOS8 - 约束含糊地暗示高度为零

iphone - UITableViewCell viewWithTag get frame of UIView 麻烦

ios - 由于缺少隐私访问说明,iTunes Connect在上载后拒绝了我的应用程序

ios - 带有嵌入式表格 View 的 ScrollView

iphone - UITableViewCell 中的 UITextField

ios - UITableView 中的多个 Nib 文件

ios - 无法更新自定义单元格上的 UIButton 标题