ios - How to hide the SectionIndex when a row is swiped and the Delete button appears -
is there way hide sectionindex bar of uitableview when delete button of row visible?
- swipe row
- delete button appears , sectionindex disappears
- swipe row or press button
- delete button disappear, or row removed, , sectionindex appears back
thanks
you'll want override following uitableviewdelegate methods. worked nicely me:
-(void)tableview:(uitableview *)tableview willbegineditingrowatindexpath:(nsindexpath *)indexpath{ headerheight = 0.0f; nsinteger sectioncount = self.thetableview.numberofsections; nsrange range = nsmakerange(0, sectioncount); [self.thetableview reloadsections:[nsindexset indexsetwithindexesinrange:range] withrowanimation:uitableviewrowanimationautomatic]; } -(void)tableview:(uitableview *)tableview didendeditingrowatindexpath:(nsindexpath *)indexpath{ headerheight = 30.0f; nsinteger sectioncount = self.thetableview.numberofsections; nsrange range = nsmakerange(0, sectioncount); [self.thetableview reloadsections:[nsindexset indexsetwithindexesinrange:range] withrowanimation:uitableviewrowanimationautomatic]; } -(cgfloat)tableview:(uitableview *)tableview heightforheaderinsection:(nsinteger)section{ return headerheight; }
Comments
Post a Comment