If I start off with a method in the implementation like this and I copy it
// Override to support editing the table view.
method PassagesTableViewController.tableView(tableView: UITableView) commitEditingStyle(editingStyle: UITableViewCellEditingStyle) forRowAtIndexPath(indexPath: NSIndexPath);
begin
if (editingStyle = UITableViewCellEditingStyle.UITableViewCellEditingStyleDelete) then begin
// Delete the row from the data source
tableView.deleteRowsAtIndexPaths([indexPath]) withRowAnimation(UITableViewRowAnimation.UITableViewRowAnimationFade);
end
else if (editingStyle = UITableViewCellEditingStyle.UITableViewCellEditingStyleInsert) then begin
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
end;
end;
and I paste it into the class declaration the comments dont retain their position.
method tableView(tableView: UITableView) commitEditingStyle(editingStyle: UITableViewCellEditingStyle) forRowAtIndexPath(indexPath: NSIndexPath);
// Override to support editing the table view.
method PassagesTableViewController.tableView(tableView: UITableView) commitEditingStyle(editingStyle: UITableViewCellEditingStyle) forRowAtIndexPath(indexPath: NSIndexPath);
begin
if (editingStyle = UITableViewCellEditingStyle.UITableViewCellEditingStyleDelete) then begin
// Delete the row from the data source
tableView.deleteRowsAtIndexPaths([indexPath]) withRowAnimation(UITableViewRowAnimation.UITableViewRowAnimationFade);
end
else if (editingStyle = UITableViewCellEditingStyle.UITableViewCellEditingStyleInsert) then begin
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
end;
end;
The method gets moved but the comments arent.
Cheers,
John