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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:47:36+00:00 2026-05-25T02:47:36+00:00

The examples of Kal calendar controller all initialize the controller in the app delegate

  • 0

The examples of Kal calendar controller all initialize the controller in the app delegate and push on a navigationController. I tried it and it does indeed work, however I need my calendar to be the rootController for one of my Tabbar items, which was added in the main nib.

What I tried was adding a UIViewController class as the root class in my nib for the item, then initializing the calendar in the view controller:

KalViewController *calendar = [[KalViewController alloc] init];
[self.view addSubview:calendar];
[calendar release];

It shows up but crashes if I touch the months,days etc…

Alternatively, I made a class based on KalViewController and made that the root class for my tab bar item. But that crashes immediately without displaying.

Maybe it’s possible to add the KalViewController directly into the tab bar viewController array, however I created the tab bar in the nib using the app delegate. I wouldnt know how to add it.

  • 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-25T02:47:37+00:00Added an answer on May 25, 2026 at 2:47 am

    I recently had to do this, I left the calendar tab out of the MainWindow.xib and then in the appDelegate I grabbed the tabBarControllers list of ViewControllers loaded them in a mutableArray, inserted the KalViewController where I wanted it and then set that back into the tabBarController.

    calendarDataSource = [[CalendarDataSource alloc] init];
    // I had to override a few things in the calendar so I subclassed it. You get the idea though
    _kalViewController = [[MyKalViewController alloc] init];
    _kalViewController.dataSource = self.calendarDataSource;
    
    _kalViewController.delegate = _kalViewController;
    UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:_kalViewController] autorelease];
    navigationController.tabBarItem.title = @"Calendar";
    navigationController.tabBarItem.image = [UIImage imageNamed:@"cal-tab.png"];
    NSMutableArray *viewControllers = [self.tabBarController.viewControllers mutableCopy];
    [viewControllers insertObject:navigationController atIndex:1];
    self.tabBarController.viewControllers = viewControllers;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tried examples from 'php.net' but don't understand what's the problem. Any suggestions? <?php $_SESSION['test']
Most examples show how to redirect all subdomain traffic to a primary domain, maintaining
Simple examples of controllers in a RESTful architecture suggest four actions per controller --
All examples I find on shuffling arrays are for NSMutableArrays. Copying an NSArray to
All examples of fluent nhibernate make such(or similar) call: c.AddMappingsFromAssembly(typeof(Product).Assembly); I don't want tu
I'm using the Kal calendar . For the code shown below I'm referring to
Examples found in the dojo documentation won't load in IE. Such as: http://docs.dojocampus.org/dijit/Calendar I've
The examples and explanations in this page are leaving me confused: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true Is there
Most examples (if not all) that I see are the sort of a function
The examples for System.Data.Entity.Database.SqlQuery method I've found appear to work well with SQL 2008

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.