this question has answer here:
- how select rows while in edit mode? 1 answer
hi when in table view editing mode, didselectrowatindexpath function not called. here code. wrong code ?
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { if (self.tableview.editing == yes) { nslog(@"now in editing mode"); } else { nslog(@"now in normal mode"); } } - (void)setediting:(bool)editing animated:(bool)animated { [super setediting:editing animated:animated]; // must called first according apple docs [self.tableview setediting:editing animated:animated]; } - (bool)tableview:(uitableview *)tableview caneditrowatindexpath:(nsindexpath *)indexpath { // return no if not want specified item editable. return yes; } - (uitableviewcelleditingstyle)tableview:(uitableview *)tableview editingstyleforrowatindexpath:(nsindexpath *)indexpath { return uitableviewcelleditingstylenone; } - (bool)tableview:(uitableview *)tableview shouldindentwhileeditingrowatindexpath:(nsindexpath *)indexpath { return no; }
please help.thanks
you have set property allowsselectionduringediting
of uitableview
true
able select row while on editing
mode. should be
self.tableview.allowsselectionduringediting=yes;
Comments
Post a Comment