Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.99 KB  |  hits: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Tab Bar at the Bottom with MonoTouch.Dialog?
  2. class MyViewController : UINavigationController {
  3.  
  4.         public MyViewController (string s)
  5.         {
  6.             TabBarItem = new UITabBarItem (s, null, 1);
  7.             var root = new RootElement (s) {
  8.                 new Section (s) {
  9.                     new StringElement (s)
  10.                 }
  11.             };
  12.             PushViewController (new DialogViewController (root), false);
  13.         }
  14.     }
  15.  
  16.     public override bool FinishedLaunching (UIApplication app, NSDictionary options)
  17.     {
  18.         window = new UIWindow (UIScreen.MainScreen.Bounds);
  19.  
  20.         var nav = new UITabBarController ();
  21.         nav.ViewControllers = new UIViewController [] {
  22.             new MyViewController ("a"),
  23.             new MyViewController ("b"),
  24.             new MyViewController ("c")
  25.         };
  26.         nav.CustomizableViewControllers = new UIViewController [0];
  27.  
  28.         window.RootViewController = nav;
  29.         window.MakeKeyAndVisible ();
  30.         return true;
  31.     }