Exemplo n.º 1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            // create a new window instance based on the screen size
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            IncludeReferences();

            // Initialize App
            App.Initialize().Wait();
            App.Activated();

            // Check if tutorial has been seen
            if (NSUserDefaults.StandardUserDefaults.BoolForKey(PreferencesSettings.FirstLaunchKey))
            {
                // If you have defined a root view controller, set it here:
                Window.RootViewController = new RootViewController();
            }
            else
            {
                UIStoryboard storyboard = UIStoryboard.FromName("MainStoryboard", null);
                IntroductionPageViewController introductionVC = storyboard.InstantiateViewController("IntroductionPageViewController") as IntroductionPageViewController;
                Window.RootViewController = introductionVC;
                UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
                UIApplication.SharedApplication.SetStatusBarHidden(false, UIStatusBarAnimation.None);
            }

            // Set background fetch interval
            UIApplication.SharedApplication.SetMinimumBackgroundFetchInterval(UIApplication.BackgroundFetchIntervalMinimum);

            // make the window visible
            Window.MakeKeyAndVisible();

            return(true);
        }
Exemplo n.º 2
0
        public void OnActivityStarted(Activity activity)
        {
            if (_referenceCount == 0)
            {
                Log.Debug("Application UI resumed");

                App.Activated();
            }

            Interlocked.Increment(ref _referenceCount);

            Log.Debug("Activity started (count {0})", _referenceCount);
        }
Exemplo n.º 3
0
 // This method is called as part of the transiton from background to active state.
 public override void WillEnterForeground(UIApplication application)
 {
     App.Activated();
 }