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?

  1. swipe row
  2. delete button appears , sectionindex disappears
  3. swipe row or press button
  4. 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

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -