title: iOS: How to add swipe to delete button to a custom view in viewForHeaderInSection
body: <p>There is a expand-collapse like table view with custom header using <code>viewForHeaderInSection</code>. 
  In that, I want to add swipe gesture functionality to delete the same view i.e <code>section header</code>.</p>
  
  <p>My code for <code>viewForHeaderInSection</code> is,</p>
  
  <pre><code>- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
  {
      mView = [[[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 110)]autorelease];
      mView.backgroundColor=[UIColor whiteColor];
  
          [mView setBackgroundColor:[UIColor whiteColor]];
          UILabel *title=[[UILabel alloc]initWithFrame:CGRectMake(10, 10, 290, 28)];
  
          title.text=[[updateDataArray objectAtIndex:section] objectForKey:@"message"];
  
          title.font = [UIFont fontWithName:@"Raleway-Medium" size:18];
  
          UIButton *bt = [UIButton buttonWithType:UIButtonTypeCustom];
          [bt setFrame:CGRectMake(0, 0, 320, 44)];
          [bt setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
          [bt setTag:section];
          addCellFlag=2;
          [bt.titleLabel setFont:[UIFont systemFontOfSize:20]];
          [bt.titleLabel setTextAlignment:NSTextAlignmentCenter];
          [bt.titleLabel setTextColor:[UIColor blueColor]];
          [bt setBackgroundColor:[UIColor whiteColor]];
          [bt addTarget:self action:@selector(addCell:) forControlEvents:UIControlEventTouchUpInside];
          [mView addSubview:bt];
          if (section&lt;updateDataArray.count-1) {
              UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(0, 2, 320, 0)];
              lineView.backgroundColor=[UIColor lightGrayColor];
              [bt addSubview:lineView];
              [lineView release];
          }
          mView.backgroundColor=[UIColor clearColor];
          [mView addSubview:title];
  return mView;
  }
  </code></pre>
  
  <p>Please suggest how to create a swipe to delete button functionality like table view row? I want that button in section header as well.</p>