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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T06:55:40+00:00 2026-05-19T06:55:40+00:00

I have app with UItabBarTemplate with navigation controller. On selecting tab bar ViewControllerA is

  • 0

I have app with UItabBarTemplate with navigation controller.
On selecting tab bar ViewControllerA is shown which on button touch pushes UIPieChartTabController which inherits “UIViewController”.
Now I want another tab bar in UIPieChartTabController.
so in viewDidLoad of UIPieChartTabController

- (void)viewDidLoad {
    [super viewDidLoad];

     UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
     contentView.backgroundColor = [UIColor whiteColor];
     self.view = contentView;
     [contentView release];
      UITabBarController *tabbar= [[UITabBarController alloc] init];
     tabbar.view.frame = CGRectMake(0, 0, 320, 460);
    piechartViewController *pr=[[piechartViewController alloc]init];
    pr.tagInAction=1;
    pr.title=@"Type";
    pr.tabBarItem.image=[UIImage imageNamed:@"trend.png"];
    pr.sDate=sDate;
    pr.nDate=nDate;

    piechartViewController *pr1=[[piechartViewController alloc]init];
    pr1.title=@"category";
    pr1.tagInAction=4;
    pr1.sDate=sDate;
    pr1.nDate=nDate;

    piechartViewController *pr2=[[piechartViewController alloc]init];
    pr2.title=@"paidWith";
    pr2.tagInAction=3;
    pr2.sDate=sDate;
    pr2.nDate=nDate;

    //tabbar.tabBar.delegate=self;
//this gave me error

    ExportRep *pr3=[[ExportRep alloc]init];
    pr3.tabBarItem.image=[UIImage imageNamed:@"database.png"];
    pr3.title=@"Export Expenses";

    [tabbar setViewControllers:[NSArray arrayWithObjects:pr,pr1,pr2,pr3,nil]];
    [self.view addSubview:tabbar.view];
    [pr release];
    [pr1 release];
    [pr2 release];
}

This piece of code worked but now when I select tab of viewController ExportRep type I tried

[self presentModalViewController:objMFMailComposeViewController animated:YES];

but navigationController of objMFMailComposeViewController hides behind navigationController of view that is presenting objMFMailComposeViewController.

Also viewWillAppear viewDidAppear of all the view controller which are bound to tab bar never gets called.

But none of this problem occurs for tabbar and viewcontroller which gets created by UITabbarTemplate.
Why Is it so? Whats wrong when I create Tab bar?

  • 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-19T06:55:41+00:00Added an answer on May 19, 2026 at 6:55 am

    The reason why new view which is being presented modally got its navigation bar hidden lies in [self.view addSubview:tabbar.view];
    so it got room to present its view only in parent controllers view thus got cut its navigation bar.
    so to hack it I kept tab selected and instead of presenting it in selected view controller,have presented it in main view controller only.

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

Sidebar

Related Questions

I have an app with a large ListView which is terribly slow so I'm
I have an app which could benefit from the user being able to choose
for example: I have app A, which references library A and library B. in
I have app in which I used soundmanager with 26 sounds. It works fine
If I have app which is already on App Store is it allowed to
I have created an iPad app which I want to send to another branch
I have an app which uses two sliders to generate a product used elsewhere
I have an app that I want to have a button that will show
I have an app in android which is a kind of client-server. I've established
We have an app with an extensive admin section. We got a little trigger

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.