public override async void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath) { if (editingStyle != UITableViewCellEditingStyle.Delete) { return; } using (var client = new TarefaService()) { try { await client.DeleteAsync(_tarefas[indexPath.Row]); } catch (Exception) { const string retorno = "Ocorreu um erro ao realizar operação! Por favor, tente novamente mais tarde!"; new UIAlertView("Deletar Tarefa", retorno, null, "OK", null).Show(); return; } } using (var client = new TarefaService()) { _tarefas = await client.ListarAsync(); } if (_tarefas != null && _tarefas?.Count > 0) { TableView.ReloadData(); } }