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

  • Home
  • SEARCH
  • 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 7721987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:04:08+00:00 2026-06-01T04:04:08+00:00

my project contains navigation controller and segmented control (with separate view controller: segmentManagingViewController) programmatically

  • 0

my project contains navigation controller and segmented control (with separate view controller: segmentManagingViewController) programmatically and now i added a tab bar in IB..while calling tab bar controller and navigation controller ,segmentManagingViewController view getting loaded twice.. both in tab bar item1 and in first segment i have called segmentManagingViewController view ….

here is screen shot of my app

screen shot

and following is
application didFinishLaunchingWithOptions method… please do help me out to resolve this …

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    databaseName = @"breadworks.sql";

    NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDir = [documentPaths objectAtIndex:0];
    databasePath = [documentsDir stringByAppendingPathComponent:databaseName];


    [self checkAndCreateDatabase];
    [self readBreadsFromDatabase];
    [self categoryFromDatabase];
    SegmentManagingViewController * segmentManagingViewController = [[SegmentManagingViewController alloc] init];
    self.navigationController = [[UINavigationController alloc] initWithRootViewController:segmentManagingViewController];
    [segmentManagingViewController release];

    [self.window addSubview:tabBarController.view];
    [window addSubview: navigationController.view];
    [window makeKeyAndVisible];


    return YES;
}
  • 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-01T04:04:08+00:00Added an answer on June 1, 2026 at 4:04 am

    I declared navigation controller and view controllers (which are used as objects of NSArray) in delegate and created initWithNibName Constructor for view controllers( defining Title, Image and other properties of TabBarItems).. here is the updated code chunks ..

    UIViewController *viewController1 = [[AtoZSecondviewController alloc] initWithNibName:@"AtoZSecondviewController" bundle:nil];
    UIViewController *viewController2 = [[CategorySecondViewController alloc] initWithNibName:@"CategorySecondViewController" bundle:nil];
    
      tabBarController.viewControllers = [NSArray arrayWithObjects:navigationController,viewController1 ,viewController2, nil];  
    

    following is Definition of initWithNibName in ViewControllers

    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
        if (self) {
            self.title = NSLocalizedString(@"Catogaries", @"Catogaries");
            self.tabBarItem.image = [UIImage imageNamed:@"TodaysChoice"];
        }
        return self;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a project which contains both applications i.e Navigation and Tab
Overview I have an iOS project which contains 2 navigation controllers as shown in
Our project contains a lot of c++ sources, up until now we were sing
My project contains shared library and exe client. I found that my own exception
My embedded project contains a Qt application for the PC which is mainly a
In Visual C# 2008, I have a solution with two projects. First project contains
I have a project that contains xml files. I also have an Ant build
We have a project that contains a library of Python and Scala packages, as
I have composite project which contains: C++ library for Linux/Windows, C++/CLI library based on
I have a VS2005 project that contains a couple web service references. The project

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.