2016-01-27 14 views
6

とデリゲートメソッドのラッパーを作成する私はRXSwiftRXSwiftどのように戻り値

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 

どのようにこのデリゲートのラッパーを実装できますか?

答えて

3

これを行う方法はありません。このメソッドは、デリゲート所有者に直接実装できます。またCellFactoryRxTableViewReactiveArrayDataSourceを参照することもできます。それはブロックするメソッドを変更します。

関連する問題