Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            View.BackgroundColor = blue;
            var bodyView  = new UIView();
            var bodyFrame = View.Frame;

            bodyFrame.Y   += 20f + 44f;
            bodyView.Frame = bodyFrame;
            View.AddSubview(bodyView);

            var tableViewWrapper = new PullToBounceWrapper(View.Frame);

            tableViewWrapper.BallColor = UIColor.White;
            bodyView.AddSubview(tableViewWrapper);

            var tableView = new SampleTableView(View.Frame, UITableViewStyle.Plain);

            tableView.BackgroundColor = UIColor.Clear;
            tableViewWrapper.AddSubview(tableView);

            tableViewWrapper.RefreshStarted += async delegate
            {
                await Task.Delay(2000);

                tableViewWrapper.StopLoadingAnimation();
            };

            MakeMock();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            List <string> lstData = new List <string>();

            for (int i = 0; i < 400; i++)
            {
                lstData.Add("Row " + i.ToString());
            }

            var scrollBar = new CustomScrollBar.CustomScrollBar();

            SampleTableView.AddScrollBar(scrollBar);
            SampleTableView.SeparatorInset = scrollBar.AdjustedTableViewSeparatorInsetForInset(SampleTableView.SeparatorInset);
            SampleTableView.Source         = new TableSource(lstData);
            SampleTableView.ReloadData();
        }