Skip to content

Instantly share code, notes, and snippets.

@ukitaka
Created August 25, 2016 05:54
Show Gist options
  • Save ukitaka/54972f9c44d5054d1b7856fc4c9f75f6 to your computer and use it in GitHub Desktop.
Save ukitaka/54972f9c44d5054d1b7856fc4c9f75f6 to your computer and use it in GitHub Desktop.
DelegateProxy
class MyTableViewDelegateProxy: RxTableViewDelegateProxy {
func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [UITableViewRowAction]? {
return []
}
}
extension UITableView {
override public func rx_createDelegateProxy() -> RxScrollViewDelegateProxy {
return MyTableViewDelegateProxy(parentObject: self)
}
override public var rx_delegate: DelegateProxy {
return MyTableViewDelegateProxy.proxyForObject(self)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment