Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PresentModel View Controller Problem

Hi Every one I have have a problem with present model view Controller. Here's the scenario:

  1. This is navigation bar application I have a UIViewController class in which I add another class of UIView Controller by using this statement [self.view addSubView:controllerClass];

  2. In controllerClass I have insert tab bar at the bottom and also write its delegates on each tab bar click i'll add another UIViewController class to it as a subView but i'll make the height or frame to this controller is (0,0,320,369). so that tab bar shown through out when we click on different tabs.

  3. By clicking on first tab say ScannerViewController add a subview. There is a gallery button in this View. when user clicks on it a presentModel View Controller Insert to it and hide the navigation bar when i select the image from the gallery and make navigation bar hidden =NO , it dosen't work and the tab bar on bottom was disappeared.

like image 711
dark Avatar asked Jul 13 '11 05:07

dark


1 Answers

It sounds like you're abusing the tab bar construct. Each tab on the tab bar should have it's own UINavigationController rather than sharing one controller per tab.

Also, in my experience it's best to present the modal view controller using the AppDelegate's lowest level view. I.e. the view that was added to the UIWindow object when the app started.

like image 107
Jack Cox Avatar answered Sep 22 '22 10:09

Jack Cox