Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Fix refresh #122

Merged
merged 5 commits into from
Feb 29, 2016
Merged

Fix refresh #122

merged 5 commits into from
Feb 29, 2016

Conversation

szweier
Copy link
Contributor

@szweier szweier commented Feb 23, 2016

I believe this could be a clean fix for the refresh control issue found here: #99

What it does

This checks to see if any of the subviews of the scrollview being set is of type UIRefreshControl. If it is it sets a new property on the shyscrollviewcontroller equal to that refresh control. If the refreshControl is nil (a scrollview without pull to refresh) the code behaves the same (still calling tly_setInsets), if the refreshControl exists it only calls tly_setInsets if the refreshControl is hidden. I tried to check if the refreshControl was refreshing but that check is too late. This PR will make it so when the pull to refresh appears (user is thinking about refreshing) we will no longer layout the views. It seems to work on my end.

@Mazyod
Copy link
Contributor

Mazyod commented Feb 23, 2016

Wow, superb work! I never thought of going with that approach, thanks for submitting this. I'll give it a shot, and merge it ASAP. Hopefully then, make a new release with this being the main new feature :D

@szweier
Copy link
Contributor Author

szweier commented Feb 23, 2016

Awesome, thanks. Yea definitely give it a run through, seems to work well for my situation but seeing other situations tested would be great.

@jgrana
Copy link

jgrana commented Feb 24, 2016

Tried this out in my project and it works great.

@szweier
Copy link
Contributor Author

szweier commented Feb 25, 2016

Good to hear. Thanks for trying it out.

Mazyod added a commit that referenced this pull request Feb 29, 2016
@Mazyod Mazyod merged commit 537bce6 into telly:master Feb 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants