public override void ViewDidDisappear(bool animated) { base.ViewDidDisappear(animated); if (BackgroundImageView != null) { BackgroundImageView.RemoveFromSuperview(); BackgroundImageView.Dispose(); BackgroundImageView = null; } if (LogoImageView != null) { LogoImageView.RemoveFromSuperview(); LogoImageView.Dispose(); LogoImageView = null; } if (loadingOverlay != null) { loadingOverlay.Hide(); loadingOverlay = null; //loadingOverlay.Dispose(); } //classifications.Clear(); //CollectionView.ReloadData(); //CollectionView.DataSource = null; }
public override void ViewDidAppear(bool animated) { base.ViewDidAppear(animated); var bounds = UIScreen.MainScreen.Bounds; if (!Settings.IsRegistered && !Settings.IsFirstLoad) { //show the loading overlay on the UI thread using the correct orientation sizing loadingOverlay = new BetterExperienceOverlay(bounds); loadingOverlay.ParentViewController = this; View.Add(loadingOverlay); } else { if (!Settings.IsRegistered) { WelcomeBackViewController welcomeBackViewController = (WelcomeBackViewController)Storyboard.InstantiateViewController("WelcomeBackViewController"); welcomeBackViewController.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext; PresentViewController(welcomeBackViewController, true, null); Settings.IsFirstLoad = false; } else { if (!Settings.IsShownPushNotificationPrompt) { PushNotificationPromptViewController pushNotificationPromptViewController = (PushNotificationPromptViewController)Storyboard.InstantiateViewController("PushNotificationPromptViewController"); pushNotificationPromptViewController.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext; PresentViewController(pushNotificationPromptViewController, true, null); Settings.IsShownPushNotificationPrompt = true; } } } this.CollectionView.ReloadData(); }