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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:33:01+00:00 2026-05-24T05:33:01+00:00

I have read that subclassing a UITabBarController is a non-recommended practice. However, how then

  • 0

I have read that subclassing a UITabBarController is a non-recommended practice. However, how then is possible to implement lazy loading of the views of tab bar items?

I’m playing around with a standard app view hierarchy: In my main app delegate file (application:didFinishLaunchingWithOptions:) , I’m instantiating a custom subclass of UITabBarController with a 4 tab bar items / icons. I only need to load the first view of the first tab bar item – other views should be loaded lazily upon request. So, in application:didFinishLaunchingWithOptions:, I’m loading welcome view and pushing it into the first UINavigationController(1). The other tab bar items are empty UINavigationControllers – (2, 3, 4). Here is my custom subclass of UITabBarController that is also a delete of himself:

@interface MainUITabBarController : UITabBarController <UITabBarControllerDelegate> {
}
@end

@implementation MainUITabBarController
-(void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
   UIImageView *image = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"TableViewBG.jpg"]] autorelease];
   UIViewController *vc = [self.viewControllers objectAtIndex:item.tag];
   vc.view = image;
}
@end

Currently, the view of the second tab bar item is just a UIViewController but I it will become a UINavigationController soon 🙂

So, back to the problem, what other (more apple-complaint) options would be to implement tab bar item action handling for lazy-loading?

  • 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-24T05:33:03+00:00Added an answer on May 24, 2026 at 5:33 am

    If I understand your question correctly, by default TabbarController loads item’s view in lazy mode. That is, unless you click on a certain item on tab bar, it won’t be loaded.

    You can check this by putting log on each view’s viewdidload and see when it is getting called.

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

Sidebar

Related Questions

I have read that in 8085 the accumulator is a 8 bit register. Then
I have read that web services are transmitted through SOAP over HTTP. Then what
I have read that Views and Controllers should be invisible to each other. How
I have read that it is a good practice to not use too many
I have read that it is possible with Tomcat 5.5+ to deploy a war
I have read that using database keys in a URL is a bad thing
I have read that while plug-ins are not supported for SQL Server Management Studio,
I have read that private variables in a base class are technically inherited by
I have read that you can do it, but would this really improve performance
I have read that gwt-ext is slow and it seems too bulky. How does

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.