void TriggerLoadMore(bool showStatus) { if (loadMoreRequested == null) { return; } if (reloading) { return; } reloading = true; if (loadMoreView != null) { loadMoreView.SetActivity(true); } loadMoreRequested(this, EventArgs.Empty); if (reloading && showStatus && loadMoreView != null && !loadMoreView.Hidden) { UIView.BeginAnimations("reloadingData"); UIView.SetAnimationDuration(0.2); TableView.ContentInset = new UIEdgeInsets(0, 0, 65, 0); UIView.CommitAnimations(); } }
void ConfigureTableView() { if (refreshRequested != null) { // The dimensions should be large enough so that even if the user scrolls, we render the // whole are with the background color. var bounds = View.Bounds; refreshView = MakeRefreshTableHeaderView(new RectangleF(0, -bounds.Height, bounds.Width, bounds.Height)); if (reloading) { refreshView.SetActivity(true); } TableView.AddSubview(refreshView); } if (loadMoreRequested != null) { // The dimensions should be large enough so that even if the user scrolls, we render the // whole are with the background color. var bounds = View.Bounds; loadMoreView = MakeLoadMoreTableFooterView(new RectangleF(0, Math.Max(TableView.ContentSize.Height, bounds.Height), bounds.Width, bounds.Height)); if (reloading) { loadMoreView.SetActivity(true); } TableView.AddSubview(loadMoreView); } }
void ConfigureTableView () { if (refreshRequested != null){ // The dimensions should be large enough so that even if the user scrolls, we render the // whole are with the background color. var bounds = View.Bounds; refreshView = MakeRefreshTableHeaderView (new RectangleF (0, -bounds.Height, bounds.Width, bounds.Height)); if (reloading) refreshView.SetActivity (true); TableView.AddSubview (refreshView); } if (loadMoreRequested != null) { // The dimensions should be large enough so that even if the user scrolls, we render the // whole are with the background color. var bounds = View.Bounds; loadMoreView = MakeLoadMoreTableFooterView(new RectangleF(0, Math.Max(TableView.ContentSize.Height, bounds.Height), bounds.Width, bounds.Height)); if (reloading) loadMoreView.SetActivity(true); TableView.AddSubview(loadMoreView); } }