6

RXSwift にデリゲートのラッパーがあります

func tableView(tableView: UITableView,movedRowAtIndexPath sourceIndexPath: NSIndexPath,toIndexRowPath destinationRowIndexPath: NSIndexPath)    

そして、彼らは次のように見えます

public var rx_itemRowMoved: ControlEvent<ItemMovedEvent> {
    let source: Observable<ItemMovedEvent> = rx_delegate.observe("tableView:movedRowAtIndexPath:toIndexRowPath:")
        .map { a in
            return ((a[1] as! NSIndexPath), (a[2] as! NSIndexPath))
    }

    return ControlEvent(events: source)
}

しかし、戻り値を持つデリゲートがあります

 func selectionViewForTableView(tableView: UITableView,destinitionCell cell:UITableViewCell,toIndexRowPath destinationRowIndexPath: NSIndexPath) -> UIView

このデリゲートのラッパーを実装するにはどうすればよいですか?

4

1 に答える 1

3

これを行う方法はありません。このメソッドは、デリゲート オーナーに直接実装できます。CellFactoryのも参照できますRxTableViewReactiveArrayDataSource。ブロックする方法を変更します。

于 2016-01-28T01:56:39.497 に答える