触摸时不突出显示表视图行
当我选择表视图的一行时,它会变成蓝色。我希望当我触摸该行时不会改变颜色。我该怎么做?
When I select a row of a table view, it becomes blue. I want the row to not change color when I touch it. How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
每个单元格都需要其中之一:
each cell will need one of these:
如果您想禁止选择表中的所有行,则在表视图控制器的设置中(例如在
viewDidLoad
中),设置参考:http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html
If you want to disallow selection of all rows in your table, then in the setup of your table's view controller (such as in
viewDidLoad
), setReference: http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html
在 cellforrowatindexpath 下,将变量分配给“cell”对象
Under the cellforrowatindexpath, assign a variable to the 'cell' object