AppDelegate.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. #if __UNIFIED__
  5. using Foundation;
  6. using UIKit;
  7. #else
  8. using MonoTouch.Foundation;
  9. using MonoTouch.UIKit;
  10. #endif
  11. namespace SDWebImageSample
  12. {
  13. // The UIApplicationDelegate for the application. This class is responsible for launching the
  14. // User Interface of the application, as well as listening (and optionally responding) to
  15. // application events from iOS.
  16. [Register ("AppDelegate")]
  17. public partial class AppDelegate : UIApplicationDelegate
  18. {
  19. // class-level declarations
  20. UIWindow window;
  21. MasterViewController masterViewController;
  22. UINavigationController navController;
  23. //
  24. // This method is invoked when the application has loaded and is ready to run. In this
  25. // method you should instantiate the window, load the UI into it and then make the window
  26. // visible.
  27. //
  28. // You have 17 seconds to return from this method, or iOS will terminate your application.
  29. //
  30. public override bool FinishedLaunching (UIApplication app, NSDictionary options)
  31. {
  32. window = new UIWindow (UIScreen.MainScreen.Bounds);
  33. masterViewController = new MasterViewController ();
  34. navController = new UINavigationController (masterViewController);
  35. window.RootViewController = navController;
  36. window.MakeKeyAndVisible ();
  37. return true;
  38. }
  39. }
  40. }