title: How to get selected indexPath.section and indexPath.row value in UITableView?
body: <p>I have insert 2 section and 2 rows in tableview, then i tried to get selected section and row value using <code>UITapGestureRecognizer</code>, but i have to get only <code>indexPath.section</code> value, i want both section and row value. Is it possible to do that? please help me</p>
  
  <p>Thanks in Advance</p>
  
  <p>I tried this: </p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      UITableViewCell *cell=[[UITableViewCell alloc]  initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell"];
      cell.selectionStyle = UITableViewCellSelectionStyleGray;
  
  //    Add the PatientName Label
  
      UILabel *cellTitle=[[UILabel alloc]initWithFrame:CGRectMake(100, 7, 300, 30)];
      cellTitle.userInteractionEnabled = YES;
      cellTitle.tag = indexPath.section;
      [cellTitle setBackgroundColor:[UIColor clearColor]];
      [cellTitle setFont:[UIFont fontWithName:@"Helvetica" size:14]];
      [cellTitle setText:[[cellArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row]];
      [cell.contentView addSubview:cellTitle];
  
      UITapGestureRecognizer *labelTap = [[UITapGestureRecognizer alloc] init];
      [labelTap addTarget:self action:@selector(viewPatient:)];
      [labelTap setDelegate:nil];
      [labelTap setNumberOfTapsRequired:1];
      [cellTitle addGestureRecognizer:labelTap]; // cellTitle add here
      [labelTap release];
  }
  
  -(void)viewPatient:(id)sender
  {
      UITapGestureRecognizer *lSender = sender;
      UILabel *lObjLabel = (UILabel *)[lSender view];
      NSLog(@"tag:%d",lObjLabel.tag); // only get indexpath.section value
  }
  </code></pre>