AppDelegate.cs 1.2 KB

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