Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable selection of a single UITableViewCell

How do you disable selecting only a single cell in a UITableView? I have several, and I only want the last to be disabled.

like image 379
DexterW Avatar asked Aug 30 '10 18:08

DexterW


People also ask

How do I turn off cell selection?

You need to set the selectionStyle property on the cell: cell. selectionStyle = UITableViewCellSelectionStyle. None in Swift, or cell.


1 Answers

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath  {     UITableViewCell *cell = ...      cell.selectionStyle = UITableViewCellSelectionStyleNone;  } 
like image 187
Camilo Sanchez Avatar answered Sep 30 '22 16:09

Camilo Sanchez