/// <summary> /// Invoke this method to signal that a reload has completed, this will update the UI accordingly. /// </summary> public void ReloadComplete() { if (refreshView != null) { refreshView.LastUpdate = DateTime.Now; } if (!reloading) { return; } reloading = false; if (refreshView == null) { return; } refreshView.SetActivity(false); refreshView.Flip(false); UIView.BeginAnimations("doneReloading"); UIView.SetAnimationDuration(0.3f); TableView.ContentInset = new UIEdgeInsets(0, 0, 0, 0); refreshView.SetStatus(RefreshViewStatus.PullToReload); UIView.CommitAnimations(); }
/// <summary> /// Invoke this method to signal that a reload has completed, this will update the UI accordingly. /// </summary> public void ReloadComplete() { if (refreshView != null) { refreshView.LastUpdate = DateTime.Now; } if (loadMoreView != null) { loadMoreView.LastUpdate = DateTime.Now; } if (!reloading) { return; } InvokeOnMainThread(() => { reloading = false; if (refreshView != null) { refreshView.SetActivity(false); refreshView.Flip(false); } if (loadMoreView != null) { loadMoreView.SetActivity(false); loadMoreView.Flip(false); loadMoreView.Frame = new RectangleF(loadMoreView.Frame.X, TableView.ContentSize.Height, loadMoreView.Frame.Width, loadMoreView.Frame.Height); } UIView.BeginAnimations("doneReloading"); UIView.SetAnimationDuration(0.3f); TableView.ContentInset = new UIEdgeInsets(0, 0, 0, 0); if (refreshView != null) { refreshView.SetStatus(RefreshViewStatus.PullToReload); } if (loadMoreView != null) { loadMoreView.SetStatus(RefreshViewStatus.PullToReload); } UIView.CommitAnimations(); }); }