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 7866633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:27:30+00:00 2026-06-03T00:27:30+00:00

I tried several ways but it seems I’m missing something.. Here is the code

  • 0

I tried several ways but it seems I’m missing something..

Here is the code I use:

- (void)configureView
{
// Update the user interface for the detail item.
  if (self.detailItem) {
    for (int idx=0; idx<16; idx++) {
        NSIndexPath *indexPath = [[NSIndexPath alloc] initWithIndex:idx];
        [self.tableView cellForRowAtIndexPath:indexPath].detailTextLabel.text = [param objectAtIndex:idx];
    }
    self.detailDescriptionLabel.text = [self.detailItem description];
  }
}

I call this on viewDidLoad. My tableview has 16 static cells, and I’m using standard “Subtitle” type cell, so no customization needed on that front. textLabel.text is filled at design time. Also my tableview is in a tableViewController. I also tried with standard population of tableview but it seems static cells don’t agree with that way.

What am I doing wrong?


@jrturton I did some changes to see what’s going on:

I added these three lines under for line to see if there’s anything there:

        UITableView *tv = self.tableView;
        UITableViewCell *cell = [tv cellForRowAtIndexPath:[NSIndexPath indexPathForRow:idx inSection:0]];
        NSString *label = [[NSString alloc] initWithString:cell.textLabel.text];

First of all tv is assigned correctly, I can see that. But other than that cell and label comes empty. Even tv has no row information it seems..

Could it be because tableview has datasource and delegate assigned to the tableviewcontroller.. I think I heard it shouldn’t be like that or something…


@jrturton Here it is:

static cells

tableview

storyboard

Hope this helps.

  • 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-03T00:27:32+00:00Added an answer on June 3, 2026 at 12:27 am

    Some logging would quicky show you that your index path is not valid and therefore no cell is being returned.

    To create an NSIndexPath for use in a UITableView, use this method:

    [NSIndexPath indexPathForRow:idx inSection:0];
    

    The index path has to contain a row and section for the table to understand it.

    You also need to call this from viewWillAppear: rather than viewDidLoad, the static table is not populated that early on. And you must call [super viewWillAppear:animated] first!

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

Sidebar

Related Questions

I have tried several different ways, but it seems that it never sends the
I've tried several of the solutions that I've found here, but none seem to
Here is what I have. I have tried several things but I can't figure
I have tried this several different ways but can't seem to figure out how
I tried several ways but the cursor can't be changed on <img> elements. I
I have tried several ways to login to a website through java. I have
I have tried several things so far, but I haven't had much luck yet.
Sorry to ask this question again but I tried several solutions on stackoverflow and
I tried two ways: void func(const char *path, const char *arg0, ...){ va_list args;
I know this has been asked before in several ways but none of the

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.