ios - RXSwift How to create wrapper for delegate method with return value -


i have wrapper delegate in rxswift

func tableview(tableview: uitableview,movedrowatindexpath sourceindexpath: nsindexpath,toindexrowpath destinationrowindexpath: nsindexpath)     

and looks

public var rx_itemrowmoved: controlevent<itemmovedevent> {     let source: observable<itemmovedevent> = rx_delegate.observe("tableview:movedrowatindexpath:toindexrowpath:")         .map { in             return ((a[1] as! nsindexpath), (a[2] as! nsindexpath))     }      return controlevent(events: source) } 

but have delegate return value

 func selectionviewfortableview(tableview: uitableview,destinitioncell cell:uitableviewcell,toindexrowpath destinationrowindexpath: nsindexpath) -> uiview 

how can implement wrapper delegate ?

there no way this. can implement method in delegate owner directly. can refer cellfactory of rxtableviewreactivearraydatasource. change method block.


Comments

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

java - Callback from new thread to class from which thread was initiated -