TableView,如何更改单元格默认的蓝色 [英] TableView, how change the cell default blue color

查看:38
本文介绍了TableView,如何更改单元格默认的蓝色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我点击UITableViewCell中的一个单元格时,默认情况下该单元格变为蓝色.我该如何改变?更改为另一种颜色,或者在我要构建的此示例中,完全摆脱该颜色.我有一个表,它只是一个表,信息在单元格中,按时它不会指向任何地方.只是令人讨厌的是,如果按下该按钮,它会变成蓝色,因为该单元格中的文本更难阅读.

When I tap a cell in UITableViewCell the cell turns blue by default. How do I change that? A change to another color or in this sample I am building, get rid of the color completely. I have a table which is just a table, the information is in the cell and it does not lead anywhere when pressed. Just annoying it turns blue if pressed, because the text in the cell is harder to read.

推荐答案

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

方法添加此代码

    cell.selectionStyle = UITableViewCellSelectionStyleNone;

这篇关于TableView,如何更改单元格默认的蓝色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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