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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -