public async override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. LocationManager = new CLLocationManager(); LocationManager.RequestWhenInUseAuthorization(); LocationManager.DistanceFilter = CLLocationDistance.FilterNone; LocationManager.DesiredAccuracy = 1000; LocationManager.LocationsUpdated += LocationManager_LocationsUpdated; LocationManager.StartUpdatingLocation(); PointOfInterest.GetCurrentPOIAsync = async() => { await Task.Run(() => waitEvent.WaitOne()); return(currentPOI); }; var source = new TableSource(await PointOfInterest.GetGlobalListAsync()); source.OnClick += Source_OnClick; MyTable.Source = source; MyTable.ReloadData(); }
public async Task GetData() { try { list.AddRange(await new Data().GetAllBeer()); MyTable.ReloadData(); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
async private void LoadTable() { var firebaseRepository = new FirebaseRepository(); var cars = await firebaseRepository.GetCarsAsync(); List <string> list = new List <string> { "Andres", "Juan", "Pedro", "Pablo", "Ismael" }; MyTable.Source = new MyTableViewSource(cars); MyTable.ReloadData(); }