ios - deselecting UITableViewCell -
i'm calling view controller table view. when return caller view table cell pressed before stays selected couldn't select again before selecting cell.
i've added deselectrowatindexpath method below didn't worked.
- (void) tableview:(uitableview *)tableview diddeselectrowatindexpath:(nsindexpath *)indexpath { [tableview deselectrowatindexpath:indexpath animated:yes]; uistoryboard *storyboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; uiviewcontroller *ctrl = [storyboard instantiateviewcontrollerwithidentifier:@"node"]; self.navigationcontroller.navigationbarhidden = no; self.navigationcontroller.navigationitem.hidesbackbutton = no; [self.navigationcontroller pushviewcontroller:ctrl animated:yes]; }
diddeselectrowatindexpath
called after row has been deselected, call deselectrowatindexpath
useless. place in didselectrowatindexpath
deselect after tapping on it:
[tableview deselectrowatindexpath:indexpath animated:yes];
Comments
Post a Comment