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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:45:45+00:00 2026-06-06T20:45:45+00:00

I simply want to have a static table View with items in it. I

  • 0

I simply want to have a static table View with items in it. I used Xcode 4.2 with storyboard for this task. So I created a TableView with a tableViewController (subclass UITableViewController). I defined the content as “Static Cells” and style “Grouped”.

After that I put some lables and all those objects I want to have in those cells. I created Outlets in the tableViewController:

#import <UIKit/UIKit.h>

@interface tableviewcontroller : UITableViewController
@property (weak, nonatomic) IBOutlet UILabel *label1;
@property (weak, nonatomic) IBOutlet UILabel *label2;
@property (weak, nonatomic) IBOutlet UISegmentedControl *segmented;
@property (weak, nonatomic) IBOutlet UIImageView *imageview;
@property (weak, nonatomic) IBOutlet UITextView *text;

@end

put some content in the cell-label:

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.label1.text = @"This is a title";
    self.label2.text = @"Annika";
    self.imageview.image = [UIImage imageNamed: @"picture.jpg"];
}

After build and run, it doesn’t show me any of the elements… what did I do wrong?

Left: In storyboard, right: In the simulator.
enter image description here

  • 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-06T20:45:46+00:00Added an answer on June 6, 2026 at 8:45 pm

    For static table views, you must not implement any of the datasource methods. The base implementation of UITableViewController has its own versions of these methods which return the appropriate content by reading the storyboard file. The methods are those which provide the table content, e.g. numberOfRows, numberOfSections, heightForRow, cellForRow and so forth.

    In your case, you’d implemented tableView:cellForRowAtIndexPath: and returned empty cells each time. This meant the size of your cells was correct, but the content was gone.

    Also, none of the outlets to content in your static table view will be set until after [super viewWillAppear:animated] has been called. They will still be nil at viewDidLoad, where you are calling them from, because the table view hasn’t asked for any of it’s content at that point.

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

Sidebar

Related Questions

I have this variable: $timestamp = strftime(%Y-%m-%d %h:%M:%S %a, time ()); I simply want
I have several sql queries that I simply want to fire at the database.
Hey guys I have an assigned array from mysql results and I simply want
I have three source files in a folder. I simply want to compile them
I have a blog on something.wordpress.com , I simply want one post to ALWAYS
I have an Activity which uses a Fragment . I simply want to pass
I have a Master Page with nested pages in ASP.NET. Fairly simply I want
Simply put I want what http://www.reddit.com/ and http://news.ycombinator.com/ have to the left of every
I have a simply MainWindow file created by the Interface Builder in black background.
i have a table that have one column (AbsoluteUrl NVARCHAR(2048)) and i want to

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.