public void NetworkUsageStarted(bool blockUser, string title) { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; if (!blockUser) return; InvokeOnMainThread(()=>{ if (_loadingView==null) _loadingView = new LoadingHUDView(); _loadingView.Title = title; UIApplication.SharedApplication.Windows.Last().AddSubview(_loadingView); _loadingView.StartAnimating(); }); }
public void NetworkUsageEnded() { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; if (_loadingView!=null){ _loadingView.FadeOutAndRemove(); _loadingView = null; } }