2015-06-18 28 views
0

工作,我想有一些我的細胞不會響應用戶交互,我試圖通過設置:selectionStyle不UITableViewCell的

​​

,但我得到的錯誤:

Use of unresolved identifier UITableViewCellSelectionStyleNone

但這似乎是禁止用戶在UITableViewCell中進行交互的正確方法。我究竟做錯了什麼?

回答

4

改變這一行

tableViewCell.selectionStyle = UITableViewCellSelectionStyleNone 

tableViewCell.selectionStyle = .None // In swift 3.0 and above use `.none` 
+0

THX - 只是想出了太多。要等幾分鐘 – timpone

+0

應該是.none – jiawen

+0

@jiawen yeah它的3.0在哪裏答案是大約一年前哪兒有swift 1.1 .. –