title: Clicking Event in UITableView
body: <p>I have a button and Table. Now I want to click in such way that Whenever I select any row in <code>tableview</code> and press the button, that particular button press event would happen. For that, firstly I have give tag to each row i.e</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  static NSString *LabelCellIdentifier = @"cell";
  UITableViewCell *cell;
  cell = [tableView dequeueReusableCellWithIdentifier:LabelCellIdentifier];
  if (cell == nil) {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LabelCellIdentifier];
  
  
  }
  
  if (indexPath.row &lt;= [_arrayMp3Link count]) {
  
      cell.textLabel.text = [_arrayMp3Link objectAtIndex:indexPath.row];
  
       }
  
  // now tag each row
  NSInteger count = 1;
  for (NSInteger i = 0; i &lt; indexPath.section; i++) {
      count += [[tableView dataSource] tableView:tableView numberOfRowsInSection:i];
  }
  count += indexPath.row;
  // dequeue, create and configure...
  cell.tag = count;
  
  
  
  return cell;
  }
  </code></pre>
  
  <p>and now in putting event in button when I select the row and press my button. But not getting the correct things.</p>
  
  <pre><code>(IBAction)doDownload:(id)sender {
  // to select first row
  if(cell.tag==1)
  {
      [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"http://www.google.com"]]; 
  }
  </code></pre>