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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:34:16+00:00 2026-06-11T18:34:16+00:00

I am having a strange issue with TableView. Here is some code to clarify

  • 0

I am having a strange issue with TableView. Here is some code to clarify everything:

I am using tabbed panes and this right here is just one of my two ViewControllers:

As you can see, all I do is setting up an UIView and placing a tableView right ontop of it.

#import "SuchenCtrl.h"

@interface SuchenCtrl ()

@end

@implementation SuchenCtrl

@synthesize MainView;
@synthesize Standort;

- (void)viewDidLoad
{
    [super viewDidLoad];
// Do any additional setup after loading the view.
    self.view = self.MainView;

    [self.Standort.tableView setDelegate:self.Standort];
    [self.Standort.tableView setDataSource:self.Standort];

    [self.MainView addSubview:self.Standort.tableView];
}

- (id)init {
    self = [super init];

    if(self) {
        CGRect rect = [[UIScreen mainScreen] applicationFrame];
        self.MainView = [[UIView alloc] initWithFrame:rect];
        [self.MainView setBackgroundColor:[UIColor blackColor]];

        //Alloc UITableViewController
        self.Standort = [[UIStandort alloc] initWithStyle:UITableViewStylePlain];

        [self.Standort release];
        [self.MainView release];
    }

    return self;
}

@end

Now UIStandort is another class that simply inherits from UITableViewController. It implements all necessary functions to display data. All im trying to achieve is having the table display “Test” a couple of times but it wont. The table gets displayed nicely but just with empty cells. When I breakpoint one of the implemented functions in the class UIStandort nothing gets called, so my assumption is that the delegate and sourceData are pointing to wrong classes? Though, I explicitly assign those before putting the table on the view.

UIStandort* Standort is declared with properties retain and nonatomic if this helps.

#import "UIStandort.h"

@interface UIStandort ()

@end

@implementation UIStandort

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    return 0;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return 5;
}

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

    UITableViewCell* cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
    cell.textLabel.text = @"Test";

    [cell autorelease];

    return cell;
}

@end

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-11T18:34:17+00:00Added an answer on June 11, 2026 at 6:34 pm

    You return 0 for the number of row in section. The documentation states:

    The number of sections in tableView. The default value is 1.

    Can you try:

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        // Return the number of sections.
        return 1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a strange issue here, i have this bit of code: <?php if
I'm having a strange issue with RedirectToAction in MVC 3.0. Here is the code
Ok so I'm having some strange issue with an mvc 3 site using javascript
I'm having a strange issue. I am using Internet explorer 9 and just changing
Having a strange issue with some C# code - the Getter method for a
I am having a strange issue with output buffering in php. with this code
I'm having a strange issue with Azure! I just recently upgraded my azure deployed
I am having a strange issue with jScrollPane plugin. After several days of using
I am having a strange issue that I can't seem to resolve. Here is
I am having a strange issue with some of my packages in the same

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.