UITableView点击以取消选择单元格 [英] UITableView tap to deselect cell

查看:54
本文介绍了UITableView点击以取消选择单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我点击时选择了 UITableViewCell 。在此选定状态期间,如果用户再次点击该单元格,我希望该单元格取消选择。



我找不到任何被调用的委托调用。任何想法如何实现这一点?它真的会成为一个手势识别器吗?

解决方案

也许我的问题不够具体,但这两个答案是我所追求的是什么。



似乎这是不可能的,我选择了单元格的手势识别器来手动设置选定/未选择状态。 / p>

I have a UITableViewCell that is selected when tapped. During this selected state, if the user taps the cell again, I want the cell to deselect.

I can't find any of the delegate calls being hit. Any ideas how to implement this? Is it really going to be a gesture recognizer?

解决方案

Maybe my question wasn't specific enough, but the two answers are a bit wide of what I was after.

It seems this isn't possible, and I went with a gesture recognizer of the cell to manually set selected / unselected state.

这篇关于UITableView点击以取消选择单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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