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);
            }
        }
示例#2
0
 void ConfigureTableView()
 {
     if (topRefreshRequested != null)
     {
         var bounds = View.Bounds;
         topRefreshView = MakeRefreshTableHeaderView(new RectangleF(0, -bounds.Height, bounds.Width, bounds.Height), true);
         if (reloading)
         {
             topRefreshView.SetActivity(true);
         }
         TableView.AddSubview(topRefreshView);
     }
     if (bottomRefreshRequested != null)
     {
         var bounds = View.Bounds;
         tableView.LayoutIfNeeded();
         bottomRefreshView         = MakeRefreshTableHeaderView(new RectangleF(0, tableView.ContentSize.Height, bounds.Width, bounds.Height), false);
         bottomRefreshView.FromTop = false;
         if (reloading)
         {
             bottomRefreshView.SetActivity(true);
         }
         TableView.AddSubview(bottomRefreshView);
     }
 }
示例#3
0
 void ConfigureTableView()
 {
     if (refreshRequested != null)
     {
         // The dimensions should be large enough so that even if the user scrolls, we render the
         // whole area with the background color.
         var bounds = View.Bounds;
         var frame  = new RectangleF(0, -bounds.Height, bounds.Width, bounds.Height);
         refreshView = MakeRefreshTableHeaderView(frame);
         if (reloading)
         {
             refreshView.SetActivity(true);
         }
         TableView.AddSubview(refreshView);
     }
 }
		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);
			}
		}
		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;
				if(DialogViewController.Version.Major >= 6)
				{
					RefreshControl = new UIRefreshControl();
					RefreshControl.AttributedTitle = new NSAttributedString("Pull down to refresh...");
					RefreshControl.ValueChanged += delegate {
						refreshRequested(this, EventArgs.Empty);
					};
				}
				else {
					refreshView = MakeRefreshTableHeaderView (new CGRect (0, -bounds.Height, bounds.Width, bounds.Height));
					if (reloading)
						refreshView.SetActivity (true);
						TableView.AddSubview (refreshView);
				}
			}
		}
		void ConfigureTableView ()
		{
			if (topRefreshRequested != null){
				var bounds = View.Bounds;
				topRefreshView = MakeRefreshTableHeaderView (new RectangleF (0, -bounds.Height, bounds.Width, bounds.Height), true);
				if (reloading)
					topRefreshView.SetActivity (true);
				TableView.AddSubview (topRefreshView);
			}
			if (bottomRefreshRequested != null){
				var bounds = View.Bounds;
				tableView.LayoutIfNeeded();
				bottomRefreshView = MakeRefreshTableHeaderView (new RectangleF (0, tableView.ContentSize.Height, bounds.Width, bounds.Height), false);
				bottomRefreshView.FromTop = false;
				if (reloading)
					bottomRefreshView.SetActivity (true);
				TableView.AddSubview (bottomRefreshView);
			}
		}