7
votes

Désactiver l'effet de sélection lors de la sélection de UitailViewCell

Comment puis-je désactiver l'effet de sélection lors de la sélection d'un utableviewcell ?


0 commentaires

8 Réponses :


2
votes

Il y a une méthode de délégation pour définir SeleCectionStyle sur Aucun.Aquace Ceci est défini sur le rechargement du tableau donne l'effet souhaité.


0 commentaires

23
votes

in TableView: CellfornatDexPath: Méthode

Utilisez ceci

cell.SelectionStyle = UitailViewCellystylenone


3 commentaires

Pour Swift 3.0, utilisez Cell.SelectionStyle = UitaireViewcellselectionStyle.none


SWIFT 4.2 Son Cell.SelectionStyle = UitaireViewCell.selectionStyle.none


Swift 5.3 Cell.SelectionStyle = .none



0
votes

Vous pouvez utiliser cellt.selectionstyle = utailviewcellselectionsylenone;

ou

[Sélection de cellulesSelectionStyle: UitablesPellselectionStylenone];

in CellfrowroDIndexpath Methode de DataSource


0 commentaires

0
votes

Écrivez ceci dans DidSelectrowatidExpath: index méthode,

cell.SelectionStyle = UitailViewCellystylenone

ou

[self.tblname déselectrowatidexpath: indéniché animé: non];


0 commentaires

4
votes

SWIFT 3.0 xxx

Le travail est effectué en réglant:

cellt.selectionstyle = .none


0 commentaires

2
votes

Vous pouvez utiliser: xxx


0 commentaires

2
votes

à Swift 4.5 / 5.0 xxx

ou, xxx


0 commentaires

0
votes

Aussi, vous pouvez également utiliser celui-ci:

UITableViewCell.appearance().selectionStyle = .none


0 commentaires