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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:08:13+00:00 2026-05-25T12:08:13+00:00

I am developing one application which includes view controller because my first two pages

  • 0

I am developing one application which includes view controller because my first two pages content only view not tab-bar.after that i have created run time tab-bar controller using this code

           UIViewController *viewcontroller1 = [[viewcontroller1 alloc] initWithNibName:@"viewcontroller1" bundle:nil];
            viewcontroller1.title = @"sometext";
            viewcontroller1.tabBarItem.image = [UIImage imageNamed:@"someimage.png"];

            UIViewController *viewcontroller2 = [[viewcontroller2 alloc] initWithNibName:@"viewcontroller2" bundle:nil];
            viewcontroller2.title = @"sometext";
            viewcontroller2.tabBarItem.image = [UIImage imageNamed:@"someimage.png"];

            tbc = [[UITabBarController alloc] initWithNibName:@"viewcontroller1" bundle:nil];
            tbc.viewControllers = [NSArray arrayWithObjects: viewcontroller1,viewcontroller2, nil];
            tbc.selectedViewController = viewcontroller1;

            ////    NSLog(@"Selected index = %d of %d", tbc.selectedIndex, [tbc.viewControllers count]);
            [self presentModalViewController:tbc animated:NO];  

it is working properly but in my second view i want tab-bar controller and navigation-controller both.
so in viewcontroller2 i have implemented code like that it’s giving me navigation controller but it’s hiding tab-bar controller

- (void)viewDidLoad 
{

    nvc = [[UINavigationController alloc] initWithRootViewController:[[viewcontroller2 alloc] initWithNibName:@"viewcontroller2" bundle:nil]];
    [self presentModalViewController:nvc animated:NO];
    [nvc release];

    [super viewDidLoad];
}

so please help me what to i do so i can get both tab-bar controller & navigation-controller in this viewcontroller2.??
please guide me.

  • 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-25T12:08:14+00:00Added an answer on May 25, 2026 at 12:08 pm

    You can create new class for tabbar and in UI Design time you can add navigation controller as tab and set view in navigation controller. Whenever you want add tabbar controller in that page create object of tabbarcontroller class object and add it on view.

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

Sidebar

Related Questions

I'm developing an application via which one can send sms by directing it to
Hai every one I am developing an windows application in which i have to
i am developing one application with map view i need display the weather depends
Im developing one application which used SeekBar to control volume in MediaPlayer. The problem
I am developing one Android application which communicate with Wifi network. I want to
i am developing one application in which there is an imageview...in which i want
I am developing a Cocoa application which involves a chat element. One approach I've
I'm developing a web application which processes invoices(the functionality is not limited to invoices,
I am new to iPhone apps, I am developing one application which requires playing
I'm developing one AS3 application in which I need to add blank editable box

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.