Advertisement
Guest User

Untitled

a guest
Oct 21st, 2011
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using MonoTouch.Foundation;
  5. using MonoTouch.UIKit;
  6. using MonoTouch.Dialog;
  7.  
  8. namespace ad4youTest
  9. {
  10.     // The UIApplicationDelegate for the application. This class is responsible for launching the
  11.     // User Interface of the application, as well as listening (and optionally responding) to
  12.     // application events from iOS.
  13.     [Register ("AppDelegate")]
  14.     public partial class AppDelegate : UIApplicationDelegate
  15.     {
  16.         // class-level declarations
  17.         UIWindow window;
  18.         UITabBarController tabC;
  19.         UINavigationController navigation;
  20.        
  21.         //
  22.         // This method is invoked when the application has loaded and is ready to run. In this
  23.         // method you should instantiate the window, load the UI into it and then make the window
  24.         // visible.
  25.         //
  26.         // You have 17 seconds to return from this method, or iOS will terminate your application.
  27.         //
  28.         public override bool FinishedLaunching (UIApplication app, NSDictionary options)
  29.         {
  30.             // create a new window instance based on the screen size
  31.             window = new UIWindow (UIScreen.MainScreen.Bounds);
  32.            
  33.             tabC = new UITabBarController ();
  34.             navigation = new UINavigationController();
  35.            
  36.             var homeScreen = new HomeScreen();
  37.             var searchScreen = new SearchScreen();
  38.             var manualScreen = new ManualScreen();
  39.             var settingsScreen = new SettingsScreen();
  40.            
  41.             tabC.ViewControllers = new UIViewController [] {
  42.                                 homeScreen,
  43.                                 searchScreen,
  44.                                 manualScreen,
  45.                 settingsScreen
  46.             };
  47.            
  48.            
  49.             this.window.RootViewController = this.navigation;
  50.             window.AddSubview(navigation.View);
  51.             navigation.PushViewController(tabC,false);
  52.                         DemoReflectionApi();
  53.             window.MakeKeyAndVisible();
  54.             return true;
  55.         }
  56.     }
  57. }
  58.  
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement