Exemplo n.º 1
0
 /// <summary>
 /// If a loading screen exists, it will fade it out.
 /// Your subclass MUST call this method once data has loaded (or a loading error occurred)
 /// to make the loading screen disappear and return control to the user
 /// </summary>
 protected void StopLoadingScreen()
 {
     using (var pool = new NSAutoreleasePool()) {
         InvokeOnMainThread(delegate {
             if (loadingView != null)
             {
                 Debug.WriteLine("Fade out loading...");
                 loadingView.OnFinishedFadeOutAndRemove += delegate {
                     if (loadingView != null)
                     {
                         Debug.WriteLine("Disposing of loadingView object..");
                         loadingView.Dispose();
                         loadingView = null;
                     }
                 };
                 loadingView.FadeOutAndRemove();
                 View.UserInteractionEnabled = true;
             }
         });
     }
 }