I have implemented cell.selectionStyle = UITableViewCellSelectionStyleNone; both in:
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath { }
and in:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { }
But each row keeps geting blue selection first time it is clicked. How can I disable the selection entirely?
The code goes like this (The cell is custom):
-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
CategoryCell *cell = (CategoryCell*)[tableView cellForRowAtIndexPath:indexPath];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return nil;
}
Implement it in
cellForRowAtIndexPath