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

[iOS] Setting UIRefreshControl state for ScrollView #5042

Closed
wants to merge 1 commit into from

Conversation

realaboo
Copy link
Contributor

Currently by setting onRefreshStart callback prop on ScrollView, the user can pull to trigger the refreshing state of the UIRefreshControl, but there's no way to do this programmatically.

This PR add a prop refreshing like PullToRefreshViewAndroid to control the refreshing state. In addition, the endRefreshing callback passed to onRefreshStart is no longer necessary
since it could be stopped by setting refreshing={false}.

I am also wondering if it's possible to provide a unified API to control the refreshing state of ScrollView on both iOS and Android, i.e. by using prop refreshing and callback prop onRefreshStart. The implementation on Android could be wrapping the ScrollView automatically into a SwipeRefreshLayout thus developers don't need to use or care about PullToRefreshViewAndroid (and its underlying SwipeRefreshLayout) in most cases.

@facebook-github-bot
Copy link
Contributor

By analyzing the blame information on this pull request, we identified @vjeux, @sahrens and @spicyj to be potential reviewers.

@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Dec 30, 2015
@janicduplessis
Copy link
Contributor

You should take a look at #4915, it provides a cross platform API for UIRefreshControl and PullToRefreshAndroid so this should not be needed.

@realaboo
Copy link
Contributor Author

realaboo commented Jan 2, 2016

Closing as duplicate to #4915. Thanks. @janicduplessis

@realaboo realaboo closed this Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants