Beispiel #1
0
 public NearbyTableViewSource(NearbyViewController nearByViewController,IBusStopRepository busStopRepository,  
          IList<BusStop> busStops)
     : base(nearByViewController, busStopRepository, busStops)
 {
     _refreshHeaderView = nearByViewController._refreshHeaderView;
     _tableView = nearByViewController._tableView;
     _nearbyViewController = nearByViewController;
 }
 public TableViewSource(RefreshingUITableViewController rtvc)
 {
     _list              = rtvc._list;
     _checkForRefresh   = false;
     _reloading         = false;
     _refreshHeaderView = rtvc._refreshHeaderView;
     _table             = rtvc.TableView;
 }
 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);
     }
 }
Beispiel #4
0
        public override void ViewDidLoad()
        {
            this.Title = "Nær deg";

            _mapButton = new UIBarButtonItem("Kart", UIBarButtonItemStyle.Bordered, delegate {
                NavigationController.PushViewController(new MapViewController("Nær deg", _nearbyBusStops.ToArray()), true);
            });

            NavigationItem.RightBarButtonItem = _mapButton;

            _tableView = new UITableView(View.Bounds, UITableViewStyle.Plain);

            View.AddSubview(_tableView);

            _refreshHeaderView = new RefreshTableHeaderView ();

            _tableView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;

            _tableView.AddSubview (_refreshHeaderView);
        }
    public override void ViewDidLoad()
    {
        base.ViewDidLoad();

        _list = new List <string> {
            "Tangerine",
            "Mango",
            "Grapefruit",
            "Orange",
            "Banana"
        };

        _refreshHeaderView = new RefreshTableHeaderView();
        _refreshHeaderView.BackgroundColor = new UIColor(226f, 231f, 237f, 1f);

        TableView.Source           = new TableViewSource(this);
        TableView.AutoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth;

        TableView.AddSubview(_refreshHeaderView);
    }
		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);
			}
		}