コード例 #1
0
        /// <summary>
        /// These are performed inside a thread to stop the view loading from being blocked.
        /// </summary>
        private void ThreadEntry()
        {
            using (NSAutoreleasePool pool = new NSAutoreleasePool())
            {
                StartupLoader loader = new StartupLoader();
                loader.InitializeDatabase();
                loader.ClearOldItems();
                loader.LoadSettings();
                loader.LoadMonoTouchDialog();
                loader.LoadCategories();
                loader.LoadItems();
                loader.LoadSites();
                loader.LoadHtmlTemplates();

                // Fade out container view
                InvokeOnMainThread(delegate
                {
                    // Add the UINav controller, send it to the back so it's hidden
                    _rootController            = new RootController();
                    _rootController.View.Frame = new RectangleF(0, -20, 320, 480);
                    View.AddSubview(_rootController.View);
                    View.SendSubviewToBack(_rootController.View);

                    UIView.BeginAnimations(null);
                    UIView.SetAnimationDuration(0.5);
                    UIView.SetAnimationTransition(UIViewAnimationTransition.None, _containerView, true);
                    UIView.SetAnimationDelegate(this);
                    UIView.SetAnimationDidStopSelector(new Selector("fadeOutDidFinish"));
                    _containerView.Alpha = 0;
                    UIView.CommitAnimations();
                });
            }
        }
コード例 #2
0
        /// <summary>
        /// These are performed inside a thread to stop the view loading from being blocked. 
        /// </summary>
        private void ThreadEntry()
        {
            using (NSAutoreleasePool pool = new NSAutoreleasePool())
            {
                StartupLoader loader = new StartupLoader();
                loader.InitializeDatabase();
                loader.ClearOldItems();
                loader.LoadSettings();
                loader.LoadMonoTouchDialog();
                loader.LoadCategories();
                loader.LoadItems();
                loader.LoadSites();
                loader.LoadHtmlTemplates();

                // Fade out container view
                InvokeOnMainThread(delegate
                {
                    // Add the UINav controller, send it to the back so it's hidden
                    _rootController = new RootController();
                    _rootController.View.Frame = new RectangleF(0,-20,320,480);
                    View.AddSubview(_rootController.View);
                    View.SendSubviewToBack(_rootController.View);

                    UIView.BeginAnimations(null);
                    UIView.SetAnimationDuration(0.5);
                    UIView.SetAnimationTransition(UIViewAnimationTransition.None,_containerView,true);
                    UIView.SetAnimationDelegate(this);
                        UIView.SetAnimationDidStopSelector(new Selector("fadeOutDidFinish"));
                    _containerView.Alpha = 0;
                    UIView.CommitAnimations();
                });
            }
        }