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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:38:31+00:00 2026-06-14T03:38:31+00:00

I have a plist that populates everything on the tab bar including the tableview:

  • 0

I have a plist that populates everything on the tab bar including the tableview: tab name, tab icon, title, detail, and makes the VCs into viewControllers array.
“Banner VC alloc with content view controller : viewControllers” – wont accept an array, only a single VC, or multiple VCs if theyre known.
The tabs are mutable, they can move and change, so I cant program them individually. How do I pass an unknown array of tabs to a bannerview controller?

Below is very close, but banner vc will only display the last set in the plist, not the whole set…And will just crash if I try passing viewControllers array to it.

What im asking is… How do you load banner vc with one plist that has 5 tabs built in it?

Thanks ahead of time. And if im way off course could someone please attempt to stear me. I really dont want to limit myself to onyl 5 tabs.

I just add a key to the plist and it automaticlly ads a tab to the more section… How do I pass this through bannew VC?

_tabBarController.viewControllers = viewControllers; //Loads the array viewControllers fine with 5 tabs and icons, but no banner container

_tabBarController.viewControllers = @[[[BannerViewController alloc] initWithContentViewController:viewControllers]] // Crashes on launch

_tabBarController.viewControllers = @[[[BannerViewController alloc] initWithContentViewController:newsNavigationController]] // Loads only the last key in plist and with no icons


     @implementation AppDelegate {
    UITabBarController *_tabBarController;
}

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    CGRect bounds = [[UIScreen mainScreen] bounds];
    self.window = [[UIWindow alloc] initWithFrame:bounds];
    self.window.backgroundColor = [UIColor whiteColor];    

    NSMutableArray * viewControllers = [[NSMutableArray alloc] init];

    NSString * subscriptionListFile = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"My_Subscription.plist"];
    NSDictionary * subscriptionList = [[NSDictionary alloc] initWithContentsOfFile:subscriptionListFile];
    NSArray * subscriptionFolders = subscriptionList[@"Folders"];

    NewsListViewController * newsController = nil;
    UINavigationController * newsNavigationController = nil;

    for (NSDictionary * folderDetails in subscriptionFolders) {

        NSArray * newsItems = folderDetails[@"Items"];
        NSString * folderTitle = folderDetails[@"FolderName"];
        NSString * folderIcon = folderDetails[@"FolderIcon"];
        UIImage * folderIconImage = [UIImage imageNamed:folderIcon];

        newsController = [[NewsListViewController alloc] initWithNewsSourceList:newsItems];
        [newsController setTitle:folderTitle];
        newsNavigationController = [[UINavigationController alloc] initWithRootViewController:newsController];
        [newsNavigationController setTitle:folderTitle];
        [newsNavigationController.tabBarItem setImage:folderIconImage];
        [viewControllers addObject:newsNavigationController];

    }

    _tabBarController = [[UITabBarController alloc] init];



//  _tabBarController.viewControllers = viewControllers;   <--- this line works, below doesnt load the array...


    _tabBarController.viewControllers = @[[[BannerViewController alloc] initWithContentViewController:viewControllers]]


         self.window.rootViewController = _tabBarController;
        [self.window makeKeyAndVisible];
        return YES;
    }
@end        //The above crashes, but works fine if I SKIP "BannerViewController alloc..." 
            //and go right to "_tabBarController.viewControllers = viewControllers"  

            //perfect but no adbanner :(
  • 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-14T03:38:32+00:00Added an answer on June 14, 2026 at 3:38 am

    The method, initWithContentViewController:, as you can tell from its name (controller not controllers), accepts only one view controller as its argument. It’s not quite clear what you’re trying to do, since that method is a method of UIPopoverController, and you wouldn’t normally make a popover controller one of the controllers in a tabBar controller’s viewControllers.

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

Sidebar

Related Questions

I have a TableView with 10 sections that are loaded from a plist file
I have a plist that compiles a UITableView by the key Title, the plist
i have a plist that's at its root an array with dictonaries inside it.
I have a plist that looks like this: <dict> <key>Aaron</key> <dict> <key>number</key> <string>1234</string> <key>country</key>
I have a plist on my server that I provide for an app. On
So I have a plist structured string, that get dynamically (not from the file
I have a django app that I made and have implemented a plist into
I have searched and found that in cordova.plist we need to add a row
I have successfully created an app that reads from a bundled .plist file and
When I use NSKeyedArchiver is the data that is written a *.plist, I have

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.