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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:19:08+00:00 2026-06-03T16:19:08+00:00

I am using customized table view to show my data from Data Core, it’s

  • 0

I am using customized table view to show my data from Data Core, it’s supposed to be looked like this

enter image description here

but what I’ve actually got is this

enter image description here

and this is my code:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return [[self.fetchedResultsController sections] count];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:section];
    return [sectionInfo numberOfObjects];
}


- (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath
{
    Item *item = [self.items objectAtIndex:indexPath.row];
    UILabel *nameLabel = (UILabel *)[cell viewWithTag:100];
    nameLabel.text = item.name;
    UILabel *catLabel = (UILabel *)[cell viewWithTag:101];
    catLabel.text = item.category;
    UILabel *amountLabel = (UILabel *)[cell viewWithTag:102];
    amountLabel.text = item.amount;

}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    static NSString *CellIdentifier = @"AccountCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    [self configureCell:cell atIndexPath:indexPath];

    return cell;

}
  • 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-03T16:19:10+00:00Added an answer on June 3, 2026 at 4:19 pm

    Your other datasource methods are working because you can see that there are cells present, but nothing is populated.

    This line:

    Item *item = [self.items objectAtIndex:indexPath.row];
    

    Is not usual when you are using a fetched results controller. It should be

    Item *item = [self.fetchedResultsController objectAtIndexPath:indexPath];
    

    If you check in the debugger you will see that item is probably nil with your current code.

    If that isn’t the case then your tags don’t match up between the prototype cell and your code. Again, this can be checked in the debugger – the labels will be nil.

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

Sidebar

Related Questions

I would like to display data from a database onto a content page using
I am using map kit and showing customized annotation view. One is carImage and
i'm using the customised cell to Show an image. But, when i add an
I am having an issue with the using jqGrid with JSON data returned from
I really need help with filling in data in a Table View, where my
I am trying to create 3 table view cells using code (w/o nib). I
I've used this tutorial to create an app with a table view that is
i am using this tutorial please guide me how can i customized it for
I have 2 classes for a UITableViewCell that show different data but they use
Hello I am using grouped table view and selecting Tableview's cell with blueselection style.

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.