public override async void CommitEditingStyle(UIKit.UITableView tableView,
			UIKit.UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)
		{
			switch (editingStyle)
			{
				case UITableViewCellEditingStyle.Delete:
					var item = ItemFor(indexPath.Section, indexPath.Row);
					await DeleteSong(item);
					tableView.ReloadData();
					//tableView.DeleteRows(new NSIndexPath[] {indexPath}, UITableViewRowAnimation.Fade);
					break;
			}
			//base.CommitEditingStyle(tableView, editingStyle, indexPath);
		}
Example #2
0
        public override async void CommitEditingStyle(UIKit.UITableView tableView,
                                                      UIKit.UITableViewCellEditingStyle editingStyle, Foundation.NSIndexPath indexPath)
        {
            switch (editingStyle)
            {
            case UITableViewCellEditingStyle.Delete:
                using (var spinner = new Spinner(Strings.Deleting))
                {
                    var item    = ItemFor(indexPath.Section, indexPath.Row);
                    var success = await MusicManager.Shared.Delete(item);

                    tableView.ReloadData();
                }
                break;
            }
        }