eggswift / pull-to-refresh

#Busy Re-Building....# An easy way to use pull to refresh and infinite scrolling in Swift. Pod 'ESPullToRefresh'
MIT License
1.82k stars 252 forks source link

发现一个问题,应该是手误 #14

Closed Xwnine closed 8 years ago

Xwnine commented 8 years ago

在 ESRefreshHeaderView这个类中有个小小的问题,或者说,我没看明白吧,

public override func startAnimating() {

...... // Navigation will automatically add 64, we are here to deal with part of the logic if scrollView.contentInset.top != insets.top || scrollView.contentOffset.x != -insets.top { UIView .animateWithDuration(0.2, animations: { scrollView.contentInset = insets scrollView.contentOffset = CGPoint.init(x: scrollView.contentOffset.x, y: -insets.top) }) } ...... }

您能解释一下,if判断的第二个条件是什么意思?是不是scrollView.contentOffset.y != -inset.top?