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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:50:14+00:00 2026-05-27T19:50:14+00:00

The text for each cell in a UITableView is not being displayed, and I

  • 0

The text for each cell in a UITableView is not being displayed, and I cannot for the life of me figure out why. I have 3 sections in the table view, and the sections are shown correctly, as is the number of rows for each section. However, the text inside each row for all the sections is empty. My code is:

This is how its looking =[

- (void)viewDidLoad    {
            [super viewDidLoad];
            listofsections = [[NSMutableArray alloc] init];

            NSArray *shuffle = [NSArray arrayWithObjects:
                                           @"Display words in alphabetical order", @"Display words in shuffled order", nil];
            NSDictionary *shuffleDict = [NSDictionary dictionaryWithObject:shuffle forKey:@"Object Key"];

            NSArray *wordFilter = [NSArray arrayWithObjects:
                                @"Show all words", @"Show words not yet appeared", @"Show words marked correct", @"Show words marked incorrect", @"Show words marked as favorite", @"Show words saved for later", nil];
            NSDictionary *wordFilterDict = [NSDictionary dictionaryWithObject:wordFilter forKey:@"Object Key"];

            NSArray *wordDisplay = [NSArray arrayWithObjects:
                                @"Display words first", @"Display definition first", nil];
            NSDictionary *wordDisplayDict = [NSDictionary dictionaryWithObject:wordDisplay forKey:@"Object Key"];

            [listofsections addObject:shuffleDict];
            [listofsections addObject:wordFilterDict];
            [listofsections addObject:wordDisplayDict];

            // Do any additional setup after loading the view from its nib.
        }

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

        return [listofsections count];
    }


    // Customize the number of rows in the table view.
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

        //Number of rows it should expect should be based on the section
        NSDictionary *dictionary = [listofsections objectAtIndex:section];
        NSArray *array = [dictionary objectForKey:@"Object Key"];
        return [array count];
    }

    - (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath {

        //return UITableViewCellAccessoryDetailDisclosureButton;
        return UITableViewCellAccessoryNone;
    }


    - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {


        if(section == 0) {
            return @"Word Display Order";
        }
        if (section == 1) {
            return @"Word Filter";
        }
        else 
            return @"Display Selection";


    }


    // Customize the appearance of table view cells.
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

        static NSString *CellIdentifier = @"Cell";

        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
        }


        // Set up the cell...

        //First get the dictionary object
        NSDictionary *dictionary = [listofsections objectAtIndex:indexPath.section];
        NSArray *array = [dictionary objectForKey:@"Countries"];
        NSString *cellValue = [array objectAtIndex:indexPath.row];
        cell.textLabel.text = cellValue;


        return cell;
    }

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
        [tableView deselectRowAtIndexPath:indexPath animated:YES];
    }
  • 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-05-27T19:50:15+00:00Added an answer on May 27, 2026 at 7:50 pm

    The dictionaries you have created dont have the key @”Countries” wich you have used in
    – (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

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

Sidebar

Related Questions

I have a table with each cell containing a label and a text field.
i have an customized cell that is loaded in table view cell and each
I have a data table filled with text in each table row. How do
i have a UItableView and i have two buttons on each cell. You can
I have TableCellViewController for managing cells in my UITableView. Each cell has a label
I have 10 UITableViewCells in my UITableView . Each cell has a UITextField .
I have a list view and want each cell in my within it to
I have a UITableView with about 20 cells, in each cell there are three
I've a table view. In each cell (row), i want to show two buttons.
I'm adding different text to each cell in UITableView. However when I do that,

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.