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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:17:37+00:00 2026-05-31T01:17:37+00:00

I m a total beginner in iOS development and need a bit of help:

  • 0

I m a total beginner in iOS development and need a bit of help:

I have a UIViewController with 2 nested TableViews.
(Implementation like here)

.h file

#import <UIKit/UIKit.h>

@interface TabAboutViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
}

    @property (nonatomic, strong) NSArray *navigationList;

@end

.m file

#import "TabAboutViewController.h"

@interface TabAboutViewController ()

@end

@implementation TabAboutViewController

#pragma mark -
#pragma mark Synthesize

@synthesize navigationList;
@synthesize informationTableView;

#pragma mark -
#pragma mark View Load

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    navigationList = [NSArray arrayWithObjects:@"Was leistet die App?",@"Wie wird gemessen?",@"Wie wird ausgewertet?",@"Was sind die Vorteile?",nil];
}

#pragma mark -
#pragma mark View UnLoad

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.

}

#pragma mark -
#pragma mark View Rotates

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return YES;
}

#pragma mark -
#pragma mark Table Management

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

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return [self.navigationList count];
}

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

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"aboutCell"];
    NSString *cellText = [self.navigationList objectAtIndex:indexPath.row];
    cell.textLabel.text = cellText;

    return cell;
}

@end

Now i want to set the background Color for one of the TableViews in the UIViewController, but i dont know how and where to do it. i dont want to change it in the storyboard.

  • 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-31T01:17:38+00:00Added an answer on May 31, 2026 at 1:17 am

    You can do that in -viewDidLoad:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        self.myTableView.backgroundColor = [UIColor red];
        // ...
    }
    

    And don’t forget to add an IBOutlet to the table view in the .h file if you didn’t already do that and link to it from Interface Builder:

    @property (weak, nonatomic) IBOutlet UITableView *myTableView;
    

    If you use tags to identify your views, you can do something like this:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        UITableView *myTableView = [self.view viewWithTag:1]; // Or what ever tag you associate with the table view
        myTableView.backgroundColor = [UIColor red];
        // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Total beginner in HTML requesting help .. hoping for a 200 response. Something like
I have stumped on this as I am a total beginner in MySql. Here
Ok I am a total beginner with the Solaris Operating system and I need
I am a total beginner in JS/XML. I have this simple code that needs
I'm a total beginner with TYPO3 and would like to show a RSS feed
I am a total beginner to programming and Django so I'd appreciate help that
Total beginner question about jQuery: I have a Form that contains several TextBoxes (input
I'm total beginner in js and JQuery and have to complete such task: I
I am a complete, total beginner in programming, although I do have knowledge of
I am a total Beginner in C++ and programming generaly. I have watched a

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.