title: Passing Parameters to Selector action
body: <p>I am in a situation where I think I am close to solving, but maybe not. </p>
  
  <p>I have a tableview of custom tableview cells.</p>
  
  <p>Currently each tableviewcell has 3 uibuttons, accessing them and giving them functionality is no problem. </p>
  
  <p>One of the 3 buttons I'm having problems with. The button pushes the user from the current navigation controller to a webview controller, but I want the webview controller to be the http address the current tableview cell is holding.</p>
  
  <p>Heres a small snippit of the code I'm using.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *cellIdentifier = @"Identifier";
  
      SearchTableCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
  
      if (cell == nil) {
          NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"SearchTableCell" owner:nil options:nil];
          //cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier];
          for(id currentObject in topLevelObjects)
          {
              if([currentObject isKindOfClass:[SearchTableCell class]])
              {
                  cell = (SearchTableCell *)currentObject;
                  break;
              }
          }
      }
  
  
      Player *event = [_party.events objectAtIndex:indexPath.row];
      cell.EventTitle.text = event.name;
      cell.EventDescription.text = event.description;
      cell.EventStartTime.text = event.start_date;
      cell.EventEndTime.text = event.end_date;
      cell.EventTicketURL = event.ticketURL;
  
      NSString *string = event.ticketURL;
  
      [cell.buyTicketOutlet addTarget:self action:@selector(pushToTicketURL:string) forControlEvents:UIControlEventTouchUpInside];
      //[cell.AddEventOutlet addTarget:self action:@selector(:) forControlEvents:UIControlEventTouchUpInside];
      //cell.textLabel.numberOfLines = 2;
      return cell;
  }
  
  
  
  
  - (void) pushToTicketURL:(NSString *)string
  {
  
      UIViewController *webViewController = [[UIViewController alloc] init];
      webViewController.title = @"Tickets";
      UIWebView *uiWebView = [[UIWebView alloc] initWithFrame: CGRectMake(0,0,320,370)];
  
      [uiWebView loadRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:string]]];
  
      [webViewController.view addSubview:uiWebView];
      [uiWebView release];
  
      [self.navigationController pushViewController:webViewController animated:YES];
      NSLog(@"Button pressed");
  }
  </code></pre>
  
  <p>I have seen some other reviews on the same question but like I said, I just need to pass one parameter to a selector, I understand that is not possible, but what other ways can I go about this problem? </p>
  
  <p>Maybe my question is badly worded :/. </p>
  
  <p>Any help will be great :)</p>
  
  <p>EDIT: I understand <code>[cell.buyTicketOutlet addTarget:self action:@selector(pushToTicketURL:string) forControlEvents:UIControlEventTouchUpInside];</code> gives errors. But what work around can I code to do what I want?</p>