2016-11-11 36 views
1

在我的UITableViewController的自定义类,我在cellRowRowAtIndexPath使用此:的UITableViewController selectionStyle没有不工作

cell?.selectionStyle = .none 

选择颜色但是仍然灰色

+0

试试这个'cell.selectionStyle = .none' – Rajat

+0

你可以使用cell.selectionStyle = .none或者您可以设置从stroyBoard –

+0

单元选择的风格没有哪一个版本SWIFT 2或3 ? – vaibhav

回答

0

它应该是这样的,

let cell = tableView.dequeueReusableCell(withIdentifier: "Cell")! as 
    UITableViewCell 
    cell.selectionStyle = .none 
1

cell.selectionStyle = none



StoryBoard您可以选择cell selection style None

enter image description here