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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:11:06+00:00 2026-06-18T02:11:06+00:00

I have a programmatically implemented tableView, in the grouped style. All I am getting

  • 0

I have a programmatically implemented tableView, in the grouped style.

All I am getting is the gray pinstripes when it should be populated. So it is loading, but not … something…

What more is necessary?
If no more, then where else ought I look?

Also, how can I make the background color of the table the same as the cell’s white color?

- (void)loadView {

    [super loadView];

    UITableView *view = [[UITableView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame style:UITableViewStyleGrouped];

    [view setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth];

    self.view = view;

    [view reloadData];

}

Is viewDidLoad necessary?

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

Thank you,

  • Morkrom
  • 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-18T02:11:08+00:00Added an answer on June 18, 2026 at 2:11 am

    You have to provide your tableView with data.

    For staters you’ll need to define a dataSource. Its common to just use your viewController as the dataSource.

    // in the .h find something similar and add <UITableViewDataSource>
    @interface ViewController : UIViewController <UITableViewDataSource>
    

    then when you make the tableView.

    view.datasource = self;
    

    Then you’ll need to provide the data itself. Implement these methods:

    #pragma mark - UITableView Datasource
    
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        return 3;
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        return 3;
    }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        static NSString *cellIdentifier = @"Cell";
    
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    
        if (!cell) {
            cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
        }
    
        [cell.textLabel setText:@"A Cell"];
    
        return cell;
    }
    

    Those methods will create 3 sections each with 3 rows. All the cells will just say A Cell. This is the basis for all tableViews. Just customize the data 🙂

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

Sidebar

Related Questions

I have my ipad code created programmatically not using nib.I converted my ipad app
I have a custom tableview cell created programmatically that consists of: a background view
I have an iPad app that is not showing a table created programmatically. Where
Im looking to programmatically delete from a GridView . I have implemented the gridview's
Would you call this implementation of a multiton in objective-c 'elegant'? I have programmatically
Do I programmatically have to manage the backcolor\highlight color on a Listview's item when
I have UIScrollView which i populate with UIImageViews programmatically. After that I change contentSize
I have some Javascript code that will programmatically register an COM interop assembly by
I have added a UILabel to my view programmatically like this: myLabel = [[UILabel
I have a textField in my application which will be initiated programmatically (textField.setText() )

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.