行编辑操作不工作 Couchbase Lite iOS 1.3

Row Edit Actions not working Couchbase Lite iOS 1.3

自从 ios 从 1.2.1 升级到 couchbase lite v 1.3 后,与行编辑操作相关的 tableview 方法没有被调用。

下面是我设置视图控制器的方式:

class MyClass: UIViewController, CBLUITableDelegate {

...
@IBOutlet weak var tableView: UITableView!
var database: CBLDatabase!;
let datasource: CBLUITableSource = CBLUITableSource();

...

override func viewDidLoad() {
    super.viewDidLoad()
    self.database = DataService.sharedInstance.getDatabase();
    self.datasource.query =     self.database.viewNamed("userNotifsView").createQuery().asLiveQuery();
    self.datasource.tableView = self.tableView;
    self.tableView.dataSource = self.datasource;
    self.tableView.delegate = self;
}

!!! CALLED !!!
func couchTableSource(source: CBLUITableSource, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell? {
    let cell = tableView.dequeueReusableCellWithIdentifier("TestCell", forIndexPath: indexPath) as! MostViewedTableViewCell;
    let row = self.datasource.rowAtIndex(UInt(indexPath.row));
    let notif = row!.value as! NSDictionary;
    cell.mLabel?.text = notif["message"] as? String;
    return cell;
}

!!! CALLED !!!
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
    tableView.deselectRowAtIndexPath(indexPath, animated: true);
}

!!! NEVER CALLED !!!
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
    print("#############################");
    print("edit actions for row at index path");
    print("#############################\n\n\n\n");

    let myAction = UITableViewRowAction(style: .Normal, title: ...
    ...

    myAction.backgroundColor = UIColor.orangeColor()
    return [myAction];
}

!!! NEVER CALLED !!!
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
    print("#############################");
    print("can edit row at index path");
    print("#############################\n\n\n\n");
    return true
}

!!! NEVER CALLED !!!
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
    print("#############################");
    print("commit editing style");
    print("#############################\n\n\n\n");
}

正在调用沙发上的 cellForRowAtIndexPath table 源,因为我可以自定义单元格。正在调用 didSelectRowAtIndexPath,这很奇怪,因为它是一个 tableView 方法。未调用 3 个与编辑操作相关的方法。大约一周前,这工作正常。然后我转向其他事情,升级到 CBL iOS 的 v1.3 并回到这个和 blugh... 不起作用。尝试降级回 1.2.1,但效果不佳。最重要的一点 post 我发现一个人不得不删除他故事板上的所有连接,我也这样做了,然后重新连接所有东西。我已经创建了新项目......没有在任何地方工作。

有什么想法吗?也许我错过了一些愚蠢的东西? 1.3 中的错误?

replication.deletionAllowed = true;

解决问题。