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();
        }
Ejemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // keep a handle on the real table view
            realTableView = base.TableView;

            // make our view the root
            var tableViewWrapper = new PullToBounceWrapper(View.Frame);

            tableViewWrapper.BackgroundColor = UIColor.Orange;
            View = tableViewWrapper;

            // add the table view to our view
            tableViewWrapper.AddSubview(realTableView);

            // continue as normal
            tableViewWrapper.RefreshStarted += async delegate
            {
                await Task.Delay(2000);

                tableViewWrapper.StopLoadingAnimation();
            };
        }