Bug 18767 - UITableViewSource::TitleForDeleteConfirmation not taken into account
Summary: UITableViewSource::TitleForDeleteConfirmation not taken into account
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.7
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-04-02 16:32 UTC by Benoit Jadinon
Modified: 2017-07-24 22:22 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Benoit Jadinon 2014-04-02 16:32:43 UTC

I've found TitleForDeleteConfirmation is not taken into account unless you set the tableview Source AFTER Editing = true;
i can guess what's happening in the background, but it took me quite a while to figure this one out, so a fix could help others in the future

public override string TitleForDeleteConfirmation (UITableView tableView, NSIndexPath indexPath)
	return "Trash";

not working :
			TableView.Source = new DataSource (this, appointmentsViewModel);
			TableView.Editing = true;
			TableView.AllowsSelectionDuringEditing = true;

working :
			TableView.Editing = true;
			TableView.AllowsSelectionDuringEditing = true;
			TableView.Source = new DataSource (this, appointmentsViewModel);

Comment 1 Benoit Jadinon 2014-04-02 16:34:49 UTC
of course, DataSource is a custom class that extends UITableViewSource, and overrides TitleForDeleteConfirmation
Comment 2 Jon Goldberger [MSFT] 2017-07-24 22:22:05 UTC
Thanks so much for taking the time to submit this report! I attempted to reproduce this issue based on the bug description with the latest Xamarin.iOS, and I was unable to hit the problem. If this issue is still occurring for you, please reopen this report and attach a project that reproduces the issue, ideally starting with a new template project and then adding just the code necessary to demonstrate the issue.