/// <summary> /// Interface to delete the question. /// </summary> /// <param name="questionItem">Question item.</param> public async void DeleteQuestion(QuestionItem questionItem) { try { Task deleteQuestion = theQuestionInfo.DeleteQuestion(questionItem); await UIUtilities.ShowIndeterminateProgressIfNecessary(deleteQuestion, string.Format("Deleting task: [{0}] ...", questionItem.QuestionText)); } finally { NavigationController.PopViewControllerAnimated(true); } }
public override async void CommitEditingStyle(UITableView tableView, UITableViewCellEditingStyle editingStyle, NSIndexPath indexPath) { switch (editingStyle) { case UITableViewCellEditingStyle.Delete: // remove the item from the underlying data source await _questionInfo.DeleteQuestion(_questionInfo.QuestionList[indexPath.Row]); // delete the row from the table tableView.DeleteRows(new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade); break; case UITableViewCellEditingStyle.Insert: System.Diagnostics.Debug.WriteLine("CommitEditingStyle: Insert called"); break; case UITableViewCellEditingStyle.None: System.Diagnostics.Debug.WriteLine("CommitEditingStyle: None called"); break; } }