Ios selectionStyle不使用UITableViewCell
我希望我的一些手机不响应用户交互,并尝试通过以下方式设置:Ios selectionStyle不使用UITableViewCell,ios,swift,uitableview,Ios,Swift,Uitableview,我希望我的一些手机不响应用户交互,并尝试通过以下方式设置: func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { .... if let header = tmpTableItem as? EKHeader { tableViewCell.textLabel!.text = menuHeader.nam
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
....
if let header = tmpTableItem as? EKHeader {
tableViewCell.textLabel!.text = menuHeader.name
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone
} ....
但是我得到了一个错误:
使用未解析标识符UITableViewCellSelectionStyleNone
但这似乎是在UITableViewCell
中抑制用户交互的正确方法。我做错了什么 更改此行
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone
到
换行
tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone
到
应该是。none@jiawen是的,它在3.0中,答案是大约一年前,swift 1.1应该在那里。none@jiawen是的,它在3.0中,答案是大约一年前的swift 1.1。。