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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:36:50+00:00 2026-05-19T01:36:50+00:00

My controller hierachy: TabBaseController (UITabBarController) SubclassedController In my tabbasecontroller I have a navigation bar

  • 0

My controller hierachy:

  • TabBaseController (UITabBarController)
    • SubclassedController

In my tabbasecontroller I have a navigation bar button, which flips the subclassedcontroller with the presentModalViewController method, to a second UITabBarController.

So my question is: why does not

self.parentViewController

work in the second UITabBarController? It is nil.

I am trying this in my viewDidLoad method in the second UITabBarController:

if (self.parentViewController == nil) {
   NSLog(@"Parent is nil");
}

UPDATED

This is the method in the UITabBarController with the navigationItemButton that presents it

-(IBAction)openModalTabController:(id)sender {  

if (self.nvc == nil) {
    ModalTabController *vc = [[ModalTabController alloc] init]; 
    self.nvc = vc;
    [vc release];
}

[self presentModalViewController:self.nvc animated:YES];
}

This is the controller(UITabBarController) that I present modally:

Header:

@interface NewBuildingViewController : UITabBarController {
}
@end

Main:

@implementation NewBuildingViewController

- (id)init {
[super initWithNibName:nil bundle:nil];

ViewController1 *vc1 = [[ViewController1 alloc] init];
ViewController2 *vc2 = [[ViewController2 alloc] init];
ViewController3 *vc3 = [[ViewController3 alloc] init];

NSArray *controllers = [[NSArray alloc] initWithObjects:vc1, vc2, vc3, nil];

[vc1 release];
[vc2 release];
[vc3 release];

self.viewControllers = controllers;
[controllers release];

self.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

return self;
}

 - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
return [self init];
}

@end

I also want to add that this message is displayed in the console(warning) when flipping:

Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.
Using two-stage rotation animation is not supported when rotating more than one view controller or view controllers not the window delegate

  • 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-19T01:36:51+00:00Added an answer on May 19, 2026 at 1:36 am

    It would be helpful if you were to show how you are presenting that second UITabBarController. Are you perhaps ignoring the following warning found in the UITabBarController class reference?

    When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.

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

Sidebar

Related Questions

I have a controller with an action method as follows: public class InventoryController :
I have 3 view controllers. Hierarchy is: Root->My_Account->Details. All controllers are navigation controller. I
Given a controller method like: def show @model = Model.find(params[:id]) respond_to do |format| format.html
I have a namespaced controller for some admin functionality. My create form does not
In my view controller's -viewDidLoad method, I call [myTextField becomeFirstResponder]; This works like a
I have a controller action that is being executed by a link that was
hai Guys, in my app i am using the combination of tabbarcontroller, navigation controller
I have this code in my table view controller (and delegate): - (void)tableView:(UITableView *)tableView
I have a controller class that uses asynchronous calls to perform some network operations.
My Controller class is decorated with an AuthorizeAttribute to protect the actions: [Authorize(Roles =

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.