1

A bit confused with wiring controllers, I need some help

I create a new Monotouch project (Master-Detail). Now, when I click on the tableview, I want to load a new view with a tabbar. SO I double-click on the DetailViewController.xib, and drag-drop a new UITabBarController. But how do I specify that I want this newly created tabbar to be displayed, instead of the empty view originally there?

Or if I had another tabbar in the same .xib, how do I specify which one to launch when the DetailViewController gets loaded?

Btw, I tried changing the DetailViewController class to inherit from UITabTarController, but then I see an empty black screen with no tabs, as opposed to the two tabs already created in XCode.

poupou
  • 43,413
  • 6
  • 77
  • 174
Themos Piperakis
  • 675
  • 8
  • 25

1 Answers1

0

Are you using a UINavigationController?

In your AppDelegate FinishedLaunching() method you would have code like:

window = new UIWindow (UIScreen.MainScreen.Bounds);
viewController = new UITabBarController();
navController = new UINavigationController(viewController);

window.RootViewController = navController;
window.MakeKeyAndVisible();

else you can just skip the UINavigationController bit. You've read all the tutorials at the MonoTouch site?

Chuck Savage
  • 11,775
  • 6
  • 49
  • 69