Note that there are some explanatory texts on larger screens.

plurals
  1. POdidSelectedRowAtIndexPath - prepareForSegue - Storyboard
    text
    copied!<p>i'm trying to send data to my DetailViewController according to the row i selected in my TableView. My project is made with a StoryBoard.</p> <p>My TableViewCell is well linked to my UIView in my MainStoryBoard, everything is fine expect that i don't know how to send the information of the row selected to my DetailView</p> <p>Here is what i have: </p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger section = [indexPath section]; NSUInteger row = [indexPath row]; NSUInteger oldRow = [lastIndexPath row]; NSString *key = [keys objectAtIndex:section]; detailRow = [names objectForKey:key]; static NSString *SectionsTableIdentifier = @"SectionsTableIdentifier"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:SectionsTableIdentifier]; if (cell == nil) { CGRect cellFrame = C GRectMake(0, 0, 300, 65); cell = [[UITableViewCell alloc] initWithFrame:cellFrame] ; } CGRect nameLabelRect = CGRectMake(200, 5, 200, 15); UILabel *nameLabel = [[UILabel alloc] initWithFrame:nameLabelRect]; nameLabel.tag = kNameValueTag; [cell.contentView addSubview: nameLabel]; UILabel *name = (UILabel *)[cell.contentView viewWithTag:kNameValueTag]; name.text = [[detailRow objectAtIndex:row] valueForKey:@"name"]; cell.imageView.image = [UIImage imageNamed:[[detailRow objectAtIndex:row] valueForKey:@"image"]]; cell.accessoryType = (row == oldRow &amp;&amp; lastIndexPath != nil) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"DetailGrandComptes" sender:self]; } - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"DetailGrandComptes"]) { // HERE IS WHERE THE CODE SHOULD BE I GUESS.... !! I HAVE TO DISPLAY AN UIIMAGEVIEW + UILABEL + UIIMAGEVIEW } } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload