Skip to content
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

Best way to interact with UIRefreshControl ? #683

Open
npvisual opened this issue Jun 15, 2020 · 0 comments
Open

Best way to interact with UIRefreshControl ? #683

npvisual opened this issue Jun 15, 2020 · 0 comments

Comments

@npvisual
Copy link
Contributor

Context : Was looking at providing a pull-down refresh capability.

Assuming controller is a UITableViewController and familyService.allMembers is a LoadingProperty, I can get this working but find it pretty convoluted. Any better / simpler way to get the same result ?

        controller.refreshCtrl.reactive
            .refreshing
            .filter { $0 }
            .castError()
            .reloading(familyService.allMembers)
            .receive(on: ExecutionContext.main)
            .observeNext { _ in
                controller.refreshCtrl.endRefreshing()
        }
            .dispose(in: controller.bag)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant