【发布时间】:2016-01-27 14:50:25
【问题描述】:
我在 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
我如何为这个委托实现包装器?
【问题讨论】:
标签: ios swift uitableview rx-swift