2011-01-14 27 views

Respuesta

2

Hay un método de delegado para setselectionstyle en none.Una vez que se configura volver a cargar la tabla da el efecto deseado.

20

en tableView:cellForRowAtIndexPath: método

uso de este

cell.selectionStyle = UITableViewCellSelectionStyleNone

+0

de rápida utilización 3.0 cell.selectionStyle = UITableViewCellSelectionStyle.none –

0

puede utilizar cell.selectionStyle = UITableViewCellSelectionStyleNone;

o

[cell setSelectionStyle:UITableViewCellSelectionStyleNone];

en cellForRowAtIndexPath dataSource method

0

escribir esto en didSelectRowAtIndexPath:index método,

cell.selectionStyle = UITableViewCellSelectionStyleNone

O

[self.tblName deselectRowAtIndexPath:indexPath animated:NO];

2

Swift 3,0

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 
    let cell = tableView.dequeueReusableCell(withIdentifier: "CellIdentifier", for: indexPath) as! UITableViewCell 
    cell.selectionStyle = .none 
    return cell 
    } 

El trabajo se lleva a cabo estableciendo:

cell.selectionStyle = .none

2

puede utilizar:

cell.selectionStyle = UITableViewCellSelectionStyleNone; 
Cuestiones relacionadas