Наследование: UITableViewSource
Пример #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            UIApplication.Notifications.ObserveDidBecomeActive ((sender, args) => {
                AppDelegate.BeaconRanger.BeaconsFound += HandleBeaconsFound;
            });

            UIApplication.Notifications.ObserveDidEnterBackground ((sender, args) => {
                AppDelegate.BeaconRanger.BeaconsFound -= HandleBeaconsFound;
            });

            UIActivityIndicatorView spinner = new UIActivityIndicatorView (UIActivityIndicatorViewStyle.Gray);
            spinner.Frame = new RectangleF (14, 5, 20, 20);
            spinner.StartAnimating ();
            this.NavigationItem.SetRightBarButtonItem (
                new UIBarButtonItem (spinner), true);

            TableView.Source = dataSource = new BeaconDataSource ();
        }
Пример #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            UIApplication.Notifications.ObserveDidBecomeActive((sender, args) => {
                AppDelegate.BeaconRanger.BeaconsFound += HandleBeaconsFound;
            });

            UIApplication.Notifications.ObserveDidEnterBackground((sender, args) => {
                AppDelegate.BeaconRanger.BeaconsFound -= HandleBeaconsFound;
            });

            UIActivityIndicatorView spinner = new UIActivityIndicatorView(UIActivityIndicatorViewStyle.Gray);

            spinner.Frame = new RectangleF(14, 5, 20, 20);
            spinner.StartAnimating();
            this.NavigationItem.SetRightBarButtonItem(
                new UIBarButtonItem(spinner), true);

            TableView.Source = dataSource = new BeaconDataSource();
        }