ios - TableView deselectRowAtIndexPath does not call setHighlighted -



ios - TableView deselectRowAtIndexPath does not call setHighlighted -

i'm trying alter states of label in table view cell. want maintain cell selected while force different view controller , move view controller tableview. when select row want remove highlight of selected row's lable (deselect selected row) , highlight current row's label. - (void)deselectrowatindexpath:(nsindexpath *)indexpath animated:(bool)animated supposed phone call - (void)sethighlighted:(bool)highlighted animated:(bool)animated highlighted 'no' cell ? note: i'm not uitableviewcontroller.

keep cell selected:

-(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath]; cell.selected = yes; //other code }

ensure class cell don't have selected = none in interface builder.

unselect lastly row:

- (nsindexpath *)tableview:(uitableview *)tableview willselectrowatindexpath:(nsindexpath *)indexpath { nsindexpath *currentselectedindexpath = [tableview indexpathforselectedrow]; if (currentselectedindexpath) { uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath]; cell.selected = no; } homecoming indexpath; }

ios uitableview

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -