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

  • Home
  • SEARCH
  • 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 6741421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:43:22+00:00 2026-05-26T11:43:22+00:00

I have set up a table view with a custom cell in my storyboard

  • 0

I have set up a table view with a custom cell in my storyboard view controller, and want to control it from my ViewController class. I have set up ViewController to act as my delegate. When I run the app it just displays an empty list and doesn’t call my one cell which has a label on it. I’d expect to see this label in the list. I’ve wired the datasource and delegate to ViewController in storyboard. My .h and .m files are as below, edited for simplicity.

When I run it I get 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' So it looks like the delegation isn’t working properly. What have I missed? Do I need to connect the cell to anything?

@interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>

@end



@implementation ViewController
...

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ReportItem"];
return cell;
}

@end
  • 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-26T11:43:23+00:00Added an answer on May 26, 2026 at 11:43 am

    Your call to [tableView dequeueReusableCellWithIdentifier:] is returning nil. This might mean that you haven’t set the identifier for your custom cell in Interface Builder (should be ‘StateCell’). You can find this setting in the Attributes inspector when you select the custom cell in IB.

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

Sidebar

Related Questions

I have custom table view cell with images (loaded from app document directory), labels,
I have a table cell for which I set its contentView to a custom
I have a custom view in a custom table cell. Every time a specific
I have a table view of custom cells representing individual uploads and each cell
I have a custom table cell class. TextInput.h @interface TextInput : UITableViewCell <UITextFieldDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate> {
I have a custom cell in a table View, see below. I have two
I have a custom table cell which has a custom ui view in it.
I have a custom table view cell view that contains a button. I initialize
I have a table view and when a user selects a cell I want
I have a view controller that has a tableView in it. When I set

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.