Skip to content

Fix Pull-To-Refresh on iOS11. - #59

Merged
kenobilyh merged 1 commit into
yahoo:masterfrom
plasmabal:iOS11PullToRefresh
Aug 29, 2017
Merged

Fix Pull-To-Refresh on iOS11.#59
kenobilyh merged 1 commit into
yahoo:masterfrom
plasmabal:iOS11PullToRefresh

Conversation

@plasmabal

Copy link
Copy Markdown

Pull-to-refresh triggers reloading immediately even pulling down for a
very short distance then releasing on iOS 11. This PR fixes it.

The root cause is that safe area insets are introduced in iOS 11. We
should respect it as the contentInsets doesn't seem to adjust anymore.

If we're going to use the old way to adjust contentInsets,
contentInsetAdjustmentBehavior should set to
UIScrollViewContentInsetAdjustmentNever, then adjust contentInsets in
the old way. Pull-To-Refresh will just work as expected.

Pull-to-refresh triggers reloading immediately even pulling down for a
very short distance then releasing on iOS 11.  This PR fixes it.

The root cause is that safe area insets are introduced in iOS 11.  We
should respect it as the contentInsets doesn't seem to adjust anymore.

If we're going to use the old way to adjust contentInsets,
contentInsetAdjustmentBehavior should set to
UIScrollViewContentInsetAdjustmentNever, then adjust contentInsets in
the old way.  Pull-To-Refresh will just work as expected.
@yahoocla

Copy link
Copy Markdown

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! 😄

@codecov-io

codecov-io commented Aug 28, 2017

Copy link
Copy Markdown

Codecov Report

Merging #59 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #59   +/-   ##
=====================================
  Coverage      25%    25%           
=====================================
  Files          29     29           
  Lines        2164   2164           
  Branches      318    318           
=====================================
  Hits          541    541           
  Misses       1584   1584           
  Partials       39     39
Impacted Files Coverage Δ
...ds/AppDevUIKit/UIScrollView+ADKPullToRefreshView.m 2.76% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 00c2a32...fa139df. Read the comment docs.

@kenobilyh kenobilyh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fix.

@kenobilyh
kenobilyh merged commit 83e5dd6 into yahoo:master Aug 29, 2017
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

Successfully merging this pull request may close these issues.

4 participants