Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8323533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:44:49+00:00 2026-06-08T23:44:49+00:00

MY PROBLEM: when the user a certain cell to select a player, I want

  • 0

MY PROBLEM: when the user a certain cell to select a player, I want the rest of the information related to that player to show up on the new view controller

So far my method looks like this:

 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath   *)indexPath
{
IPlayerViewController *detailViewController = [[IPlayerViewController alloc] initWithNibName:@"IPlayerViewController.h" bundle:nil];
Player *playerF = [playerArray objectAtIndex:indexPath.row];
detailViewController.PlayerLabel.text=playerF.Name;

[self.navigationController pushViewController:detailViewController animated:YES];

}

However the PlayerLabel that i created in IPlayerViewController (and connected the UILabel to the label in storyboard) is blank.

If this looks familiar it is because i am following the following tutorial, but trying to add my own things. Thanks a lot!
http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1

EDIT:
I am USING storyboard. However, in the predefined method, xcode came with the following comment to initialize with Nib Name which threw me off.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath   *)indexPath
{
   // Navigation logic may go here. Create and push another view controller.
/*
 <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
 // ...
 // Pass the selected object to the new view controller.
 [self.navigationController pushViewController:detailViewController animated:YES];
 */

}

So it seems like I should use prepareForSegue. Is this something I call in the didSelectRowAtIndexPath or do i ignore that method?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T23:44:51+00:00Added an answer on June 8, 2026 at 11:44 pm

    If you are using storyboards, then most likely you won’t see a call to -tableView:didSelectRowAtIndexPath:. If you are using segues to get to the next view, then you will need to use -prepareForSegue:sender: see: How to pass prepareForSegue: an object.


    Update

    Do you have a segue from the table view cell to your detail view controller?

    If you have a segue, then -tableView:didSelectRowAtIndexPath: is not what you want. If you have a segue, create a -prepareForSegue:sender: method in your table view controller. It will look something like:

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
        NSIndexPath *indexPath = [self.tableView indexPathForCell:sender];
        Player *player = [self.playerArray objectAtIndex:indexPath.row];
    
        IPlayerViewController *destination = segue.destinationViewController;
        destination.player = player;
    }
    

    Assuming of course that IPlayerViewController has a player property.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu item that I want to show/hide only if the user
Devise allows user email lookups. This is a certain privacy issue. The problem is
I have an Excel worksheet where the user enters certain data, which I want
Here's my problem: a user searches for products by size. The result should show
I'm developing a site that sends email notifications to users after certain events/user actions
There are a class of Android applications that enable password protection on certain user-specified
I'm writing a jquery-plugin, that changes a css-value of certain elements on certain user-actions.
I'm trying to show a UIProgressView on top of a table view after certain
I'm trying to handle the problem where a user can try to open, with
This is inspired by/taken from this thread: http://www.allegro.cc/forums/thread/603383 The Problem Assume the user gives

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.