New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DrawerKit with RxCocoa, UITableView didSelectRow
not called
#94
Comments
Hi @popei69 ✋
I guess this issue is rather a matter of RxSwift than DrawerKit. But as far as I know from my experience, you can set |
Hi @inamiy, thanks for the quick reply.
Sorry for the confusion, that's already the case, that's what I meant by "If I implement
I'm not sure what you meant here. If the DrawerKit still the delegate for scrolling purpose, what should be the parameter of
That make sense, that's what I thought. I worked around by reimplementing the delegate and manually triggering the next observer for time being. |
// 1. Set `scrollViewForPullToDismiss` first.
// (NOTE: This will swap `tableView.delegate` internally)
drawerPresentationController?.scrollViewForPullToDismiss = tableView
// 2. Then, set `tableView.rx.setDelegate` with swapped `tableView.delegate` as an argument.
// (NOTE: This will retry `RxScrollViewDelegateProxy.installForwardDelegate` internally)
if let delegate = tableView.delegate {
_ = tableView.rx.setDelegate(delegate)
} Try this. This will retry calling |
@inamiy Thanks for the update. I had a look into it but it seems to create an infinite loop and finally crash. The So I kept my previous version where I reimplement the Anyway thanks for taking time to reply, I understand more how both works so it's much appreciated. Closing this ticket since it's a RxSwift concern and not DrawerKit. |
I use DrawerKit to display a UIViewController with an UITableView. I use RxSwift / RxCocoa to handle UITableView data / events.
I've noticed that DrawerKit
PullToDismissManager
can't forward event toRxTableViewDelegateProxy
as it does withUITableViewDelegate
:scrollViewForPullToDismiss
,tableView.rx.itemSelected
works as usual.scrollViewForPullToDismiss
with a classicUITableViewDelegate
approach, implementation ofdidSelectRowAt:index
works as usual.scrollViewForPullToDismiss
,tableView.rx.itemSelected
doesn't work.I'm not sure if it's more a question to address in RxCocoa side or DrawerKit. I wonder if you had this issue before and have a hint to proceed except reimplementing
UITableViewDelegate
for that specific view.Thanks
The text was updated successfully, but these errors were encountered: