ios - Disable UITableViewCell selection by touch but enable by method call -



ios - Disable UITableViewCell selection by touch but enable by method call -

what best way of preventing user selecting cell within uitableview, allowing programme phone call selectrowatindexpath: on table view?

i want controls in uitableviewcell remain interactive (i.e. allow touchesbegan: called on uitableviewcell).

if [tableview setallowsselection:no], calling selectrowatindexpath: not anything.

i realized when phone call selectrowatindexpath: programmatically, delegate method willselectrowatindexpath: not called. however, if user taps cell, called. method can homecoming nil prevent selection.

- (nsindexpath *)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath { homecoming nil; }

this ensure programmatic calls selectrowatindexpath: select row , taps select row not.

ios objective-c uitableview touches

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -