如何在didSelectRowAtIndexPath中到达当前选定的单元格? [英] How to reach the current selected cell in didSelectRowAtIndexPath?

查看:100
本文介绍了如何在didSelectRowAtIndexPath中到达当前选定的单元格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过以下方法更改单元格的附件视图类型:didSelectRowAtIndexPath,即当选择行时我想更改附件视图类型,我可以在该方法中执行此操作吗?

I want to change the accessory view type of a cell through the method: didSelectRowAtIndexPath , i.e. when a row is selected I want to change the accessory view type, can I do this inside that method ?

推荐答案

您可以使用 indexPath 这样从 didSelectRowAtIndexPath:方法获取单元格。

You can get the cell from didSelectRowAtIndexPath: method using the indexPath like this.

UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

这篇关于如何在didSelectRowAtIndexPath中到达当前选定的单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆