public async Task AddUser() { var bounds = UIScreen.MainScreen.Bounds; loadingOverlay = new LoadingOverlay(bounds); View.Add(loadingOverlay); var result = await ViewModel.CreateUser(); loadingOverlay.Hide(); if (result) { ShowMessage("User Added!"); } }
public async Task LoadUsers() { var bounds = UIScreen.MainScreen.Bounds; loadingOverlay = new LoadingOverlay(bounds); View.Add(loadingOverlay); await ViewModel.LoadUsers(); Title = "User List"; this.MainTableView.Source = new UserTableSource(ViewModel.Users); this.MainTableView.ReloadData(); this.MainTableView.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine; loadingOverlay.Hide(); }