title: Hide buttons in cell by other button press uitableview
body: <p>Wondering how can I get all items of each cell in <code>UITableView</code>. My problem is that I want to hide 2 buttons in cell when third is selected. </p>
  
  <p><img src="https://i.stack.imgur.com/l4vuL.png" alt="example of my cell"></p>
  
  <p>When I press on button 1, button 2 and 3 must be hidden. What I tried to do for that (in cellForRowAtIndexPath) :</p>
  
  <pre><code>AVMMovieButton *settings = (AVMMovieButton *)[cell viewWithTag:228];
  [settings addTarget:self action:@selector(selectSettings:) forControlEvents:UIControlEventTouchUpInside];
  settings.tag = indexPath.row;
  
  AVMMovieButton *playButton = (AVMMovieButton *)[cell viewWithTag:134];
  [playButton setStore:oneItem];
  [playButton addTarget:self action:@selector(playMovie:) forControlEvents:UIControlEventTouchUpInside];
  playButton.tag = indexPath.row;
  
  AVMMovieButton *down = (AVMMovieButton *)[cell viewWithTag:282];
  
  AVMMovieButton *del = (AVMMovieButton *)[cell viewWithTag:161];
  
  [settings  setSelected:!settings.isSelected];
  if (settings.isSelected) 
  {
      NSLog(@"SELECTED!");
  
      down.hidden = YES;
      del.hidden = YES;
      downLabel.hidden = YES;
      delLabel.hidden = YES;
  
     // [self performSelector:@selector(playButtonShow) withObject:nil afterDelay:0.3];
      playButton.hidden = NO;     
  }
  else
  {
      NSLog(@"UNSELECTED!");
  
      playButton.hidden = YES;
      down.hidden = NO;
      del.hidden = NO;
      downLabel.hidden = NO;
      delLabel.hidden = NO;
  
      NSLog(@"play button %d",playButton.hidden);
  }
  </code></pre>
  
  <p>and then I added method for selecting my "settings" button:</p>
  
  <pre><code>-(void)selectSettings:(AVMMovieButton *)sender
  {
      [sender setSelected:!sender.isSelected];
      NSLog(@"you just select button");
  }
  </code></pre>
  
  <p>but it doesn't work!</p>
  
  <p>Actually <code>NSLog(@"you just select button");</code> works, but buttons never hides.</p>
  
  <p>What should I do to get my buttons and hide them?</p>
  
  <p><strong>SOLVED:</strong></p>
  
  <p>All I needed to do was to create custom <code>UITableViewCell</code> class and then access my cell as Jay Gajjar and Akhilrajtr said. After I just used my method for select/deselect my button.</p>
  
  <p>What I've got:</p>
  
  <pre><code>-(void)selectSettings:(AVMMovieButton *)sender
  {
      AVMMovieButton *settings = (AVMMovieButton *)sender;
      CGPoint pointInTable = [settings convertPoint:settings.bounds.origin toView:readyTable];
      NSIndexPath *indexPath = [readyTable indexPathForRowAtPoint:pointInTable];
      AVMMovieCell *cell=(AVMMovieCell *)[readyTable cellForRowAtIndexPath:indexPath];
      if (cell.settingsButton.isSelected) 
      {
          NSLog(@"SELECTED!");
  
          cell.downloadButton.hidden = YES;
          cell.deleteButton.hidden = YES;
          cell.downLabel.hidden = YES;
          cell.delLabel.hidden = YES;
          cell.playButton.hidden = NO; 
      }
      else 
      {
          NSLog(@"UNSELECTED!");
          cell.playButton.hidden = YES;
          cell.downloadButton.hidden = NO;
          cell.deleteButton.hidden = NO;
          cell.downLabel.hidden = NO;
          cell.delLabel.hidden = NO;
          NSLog(@"play button %d",cell.playButton.hidden);
      }
      [settings setSelected:!settings.isSelected];
  }
  </code></pre>
  
  <p>Hope this can be helpful for somebody else!</p>