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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -