I can't show a UIToolbar that was at the bottom of a view, where the view pushed a navigation controller and then popped back to the view using the back button.
In a NIB I've created:
UIViewController RootViewController containing a
UIView containing a
UIToolbar at bottom of UIView
In RootViewController I create next UIViewController, NextViewController, within which I create a NavigationController:
UIViewController RootViewController containing a
UIViewController NextViewController containing a
NavigationController
In NextViewController I can see the UIToolbar from RootViewController. When I pop back to NextViewController, using the back button, from the NavigationController I can no longer see the UIToolbar from RootViewController. Does anyone know how to make the UIToolbar visible?
One approach I thought would work was to get a pointer to the UIToolbar and add it as a subview to the navigation controller as:
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
RootViewController *rootViewController = appDelegate.rootViewController;
UIView *rootViewUIView = rootViewController.view;
UIToolbar *rootViewUIToolbar = rootViewUIView.toolbar;
[self.navigationController.view addSubview:rootViewUIToolbar];
But I get the error: "Request for member rootViewUIToolbar in something not a structure or a union" for the line:
UIToolbar *rootViewUIToolbar = rootViewUIView.toolbar;
Any ideas on how to show the toolbar after popping back to the root view from the navigation controller using the back button?