Beispiel #1
0
        public override void ViewDidLoad()
        {
            View.BackgroundColor = UIColor.Black;
            bookButton           = new UIButton(new RectangleF(10, 100, this.View.Frame.Width - 10, 40));


            bookButton.BackgroundColor = UIColor.Clear;
            setButton();

            bookButton.TouchUpInside += delegate {
                gymClass.book();
                System.Console.WriteLine(gymClass.unbookAction);
                ScheduleTableViewDataSource ds = ( ScheduleTableViewDataSource )tableView.DataSource;
                ds.force = true;
                ds.ReloadData();
                tableView.ReloadData();

                if (!ds.isMyBookings)
                {
                    gymClass = ds.getGymClass(indexPath);
                    setButton();
                }
            };

            this.View.AddSubview(bookButton);
        }
        public void populateView()
        {
            ScheduleTableViewDataSource dataSource = (ScheduleTableViewDataSource)scheduleTableViewController.TableView.DataSource;

            dataSource.ReloadData();
            scheduleTableViewController.TableView.ReloadData();
            activityIndicator.RemoveFromSuperview();
            View.AddSubview(scheduleTableViewController.View);
        }