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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:52:22+00:00 2026-06-13T13:52:22+00:00

I have a UIViewController (StoreViewController), and in it’s .xib is a UITableView to the

  • 0

I have a UIViewController (StoreViewController), and in it’s .xib is a UITableView to the left, and a standard UIView to the right. I have created a UITableViewController called StoreTableController and want to somehow make it the the controller of the table view within the StoreView.xib.

Unfortunately, I need to keep the File Owner of the nib file as StoreViewController. I have a delegate within the StoreTableController which has been set as the StoreViewController (this is for calling certain methods), and within the StoreViewController I have an instance of the StoreTableController.

So far I have tried keeping an outlet of the UITableView within StoreViewController and then doing this:

[self addChildViewController:self.tableController];

[self.tableController setTableView:self.table];

[self.table setDataSource:self.tableController];
[self.table setDelegate:self.tableController];

Where self.table is the outlet, and self.tableController is the instance of the StoreTableController.

However, I do not fully understand how to use UIViewController containment, so this is obviously incorrect.

I have tried variations of this as well, but really don’t know what to do.

I have avoided using a UISplitViewController here because not only is the left view larger than the right, but also there are various things I plan to do which mean this must be done in a single .xib file if possible.

Any help is very much appreciated.

  • 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-13T13:52:23+00:00Added an answer on June 13, 2026 at 1:52 pm

    First, put a regular UIView instead of a UIScrollView in your .xib. Connect it with an IBOutlet called “tableContentView”.

    Then, create a new instance of UITableViewController (or your custom class, derived from UITableViewController) in your code, and add its UIView to the tableContentView like so:

    - (void)viewDidLoad
    {
        [super viewDidLoad];
    
        //  Add tableView
        UITableViewController *someTableViewController = [[UITableViewController alloc] init];
        someTableViewController.view.frame = self.tableContentView.bounds;
        someTableViewController.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
        [self.tableContentView addSubview:someTableViewController.view];        
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UIViewController with its own .xib, and I want to use a
I have an UIViewController which contains a UITableView (subclassed) and another UIView (subclassed). They
I have a problem with data in UITableView. I have UIViewController, that contains UITableView
Here is the situation, I have UIViewController class with a UITableView outlet. I would
I have a UIViewController (which sits inside a tabUIController). Within this UIViewController, I want
I have a UIViewController class and a second which I want to push modally
I have a UIViewController set up to display an info-button on the right in
I have a UIViewController subclass called TripViewController. This class has the following method: -
I have a UIViewController that I want to display a second UIViewController as a
I have a UIViewController, and within that view i have UITableView added in IB

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.