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
Post a Comment