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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:14:24+00:00 2026-05-26T04:14:24+00:00

i have a view controller with some custom buttons in it, AND AFTER CLICKING

  • 0

i have a view controller with some custom buttons in it, AND AFTER CLICKING a button i am presenting different view .and to one of the button click i am presenting a tab bar controller with navigation controller .

and the code is as follows

TabBarView *tabbar=[[TabBarView alloc]init];
        UINavigationController *navNextController       = [[UINavigationController alloc] initWithRootViewController:tabbar];
        [self presentModalViewController:navNextController animated:YES];

and in tab bar the code is as follows

UINavigationController *localNavigationController;
tabbarcontroller = [[UITabBarController alloc] init];

localControllersArray = [[NSMutableArray alloc] initWithCapacity:3];
tabbarcontroller.delegate=self;


ShoppingListView *shop;
shop = [[ShoppingListView alloc] init];
shop.parentVC=self;
localNavigationController = [[UINavigationController alloc] initWithRootViewController:shop];
[localNavigationController.tabBarItem setTitle:@"Lists"];
[localNavigationController.tabBarItem setImage:[UIImage imageWithContentsOfFile:[IMBundle fullBundlePath:@"Images.bundle/Images/EnhancedMobileLists/list.png"]]];   
[localNavigationController viewWillAppear:YES];
[localControllersArray addObject:localNavigationController];
[localNavigationController release];
[shop release];

FavoritesViewController *fav;
fav = [[FavoritesViewController alloc] init];
fav.parentVC=self;
localNavigationController = [[UINavigationController alloc] initWithRootViewController:fav];
[localNavigationController.tabBarItem setTitle:@"Favorites" ];
[localNavigationController.tabBarItem setImage:[UIImage imageWithContentsOfFile:[IMBundle fullBundlePath:@"Images.bundle/Images/EnhancedMobileLists/favorites.png"]]];  
[localNavigationController viewWillAppear:YES];
[localNavigationController viewWillDisappear:YES];
[localControllersArray addObject:localNavigationController];
[localNavigationController release];
[fav release];

ShareListViewController *share;
share = [[ShareListViewController alloc] init];
share.parentVC=self;
localNavigationController = [[UINavigationController alloc] initWithRootViewController:share];
[localNavigationController.tabBarItem setTitle:@"Share" ];
[localNavigationController.tabBarItem setImage:[UIImage imageWithContentsOfFile:[IMBundle fullBundlePath:@"Images.bundle/Images/EnhancedMobileLists/share.png"]]];  
[localNavigationController viewWillAppear:YES];

[localControllersArray addObject:localNavigationController];
[localNavigationController release];
[share release];

tabbarcontroller.viewControllers = localControllersArray;
[self.view addSubview:tabbarcontroller.view];

the main problem is while clicking the button to present the tab bar view it takes time to load ie for a moment it appears as if the view is hanged and i am presenting a navigation view in another button and it is working fine with out any delay . please tell me whats wrong with my code and how to rectify the delay to present a tab bar while clicking a uibutton in iphone.

thanks in advance

  • 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-26T04:14:24+00:00Added an answer on May 26, 2026 at 4:14 am

    Below code is written into the Appdelegate file and then this method is call on the button when tap on the button this method is call.

    -(void)ShowTabAbout{ [viewController.view removeFromSuperview]; self.imgV.frame=CGRectMake(0, 425, 320, 55);
    self.imgV.image=[UIImage imageNamed:@”tBar5.png”]; [self.tabctr.view
    addSubview:self.imgV]; self.tabctr.selectedIndex=4; // [self
    animationTabCode]; [window addSubview:tabctr.view];

     }
    

    Following code for the Animation for navigate the view controller.

    -(void)animationTabBarCode{

     tr.type=kCATransitionPush;
     tr.subtype=kCATransitionFromRight;
    
    
     tr.delegate=self;    
    

    [self.window.layer addAnimation:tr forKey:nil]; }

    following code is implanted into the button which located view controller method file.

    -(IBAction)btnTapped:(id)sender{

    [appDelegate ShowTabAbout];

     [appDelegate animationTabBarCode];  
    

    }

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

Sidebar

Related Questions

I have some animation attached to a custom button in a view controller: -
I have a custom button on a view controller in the navigation controller's heirarchy,
I have some map view controller and I have a custom annotation. Custom annotation
I have one main view with an associated controller. I have some rather complicated
I have a view controller that gets presented modally and changes some data that
Lets say I have a view, myView, a view controller, myViewController, and some sort
I have this in my controller. I need my view to generate some HTML,
I have a view based project with a set of buttons. When one of
I'm trying to achieve a custom controller containing of various buttons in different shapes.
I have view controller, into the view i have put a table view, and

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.