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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:10:01+00:00 2026-06-04T01:10:01+00:00

I have implemented a view controller with a table view controll called ligatable. This

  • 0

I have implemented a view controller with a table view controll called ligatable. This table view has its delegate in a table view controller called ligaViewController.h. Table view control has implemented one prototype cell, that has set ligaCell.h controller. Here are the details:

competicionViewController.h

#import "ligaViewController.h"

@interface CompeticionViewController : UIViewController 
{

    IBOutlet UITableView *ligaTable;
    ligaViewController *ligaController;

}

@property (strong, nonatomic) IBOutlet UITableView *ligaTable;
@property (strong, nonatomic) ligaViewController *ligaController;

competicionViewController.h

- (void)viewDidLoad
{
...

 ligaController = [[ligaViewController alloc] init];

    [ligaTable setDelegate:ligaController];
    [ligaTable setDataSource:ligaController];

....

And the delegate method in ligaViewController:

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

        ligaCell *cell = [self.tableView
                          dequeueReusableCellWithIdentifier:@"posicion"];


        NSDictionary *posicion = [[NSDictionary alloc] initWithDictionary: [ligaArray objectAtIndex:indexPath.row]];

        cell.posicion.text = [posicion valueForKey:@"posicion"];

        cell.PJ.text = [posicion valueForKey:@"pj"];

        cell.PG.text = [posicion valueForKey:@"pg"];

        cell.PP.text = [posicion valueForKey:@"pp"];

        cell.PF.text = [posicion valueForKey:@"favor"];

        cell.PC.text = [posicion valueForKey:@"contra"];

        return cell;

}

It is currently giving me this error:

terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'

Many thanks

  • 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-04T01:10:03+00:00Added an answer on June 4, 2026 at 1:10 am

    Use –

    ligaCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"posicion"];
    if (cell == nil)
    { 
        cell = [[[ligaCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CustomCellIdentifier] autorelease];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I have implemented this method to add a footer to my table view:
I have a view controller class that has to implement several protocols. Too keep
I have implemented horizontal page view. One base page and three swipe pages. The
i have implemented a list view its working fine but when i click on
I want to implement this view But I have one question: The text which
Sup fellas, so I have a navigation controller with a table view to which
Hey guys, I currently have a root table view which has a toolbar at
I have a Java project that I'm trying to implement with a model-view-controller design.
I have implemented a custom view within another activity into a XML layout. The
I have created a custom annotation view. In the setSelected method i have implemented

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.