title: Hiding a Button in a UITableViewCell
body: <p>I currently have a table with 8 rows that each have a label on the right side and a button on the left. I was hoping that I could have all the buttons hidden until the user presses an "edit" button in the top right corner and then they would appear allowing the user to interact with each table cell. I don't know if this is possible, because they are in <code>UITableViewCell</code>s or if there is an easier method to summoning a button for each cell</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>okay so I have placed in all the hidden properties and there seem to be no errors, but the app doesn't recognize any of it. The buttons remains unhidden despite the fact that they are set to be initially hidden. Here is my code </p>
  
  <p>Here is my Table Cell code:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:  (NSIndexPath      *)indexPath
  {
      static NSString *CellIdentifier = @"BlockCell";
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier   forIndexPath:indexPath];
  
      cell.textLabel.text = @"Free Block";
  
      UIButton*BlockButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
  
      BlockButton.frame = CGRectMake(225.0f, 5.0f, 75.0f, 35.0f);
      [BlockButton setTitle:@"Change" forState:UIControlStateNormal];
      [BlockButton addTarget:self action:@selector(Switch:) forControlEvents:UIControlEventTouchUpInside];
  
      Blockbutton.backgroundColor = [UIColor colorWithRed:102/255.f
                                                   green:0/255.f
                                                   blue:51/255.f
                                                   alpha:255/255.f];
      Blockbutton.hidden = YES;
      [cell addSubview:BlockButton];
      return cell;
  }
  </code></pre>
  
  <p>and here is my method code:</p>
  
  <pre><code>- (IBAction)Editmode:(UIButton *)sender 
  {
      Blockbutton.hidden = !Blockbutton.hidden;
      [self.tableView reloadData];
  }
  </code></pre>
  
  <p>any thoughts or ideas as to what might be the issue?</p>