gontovnik / DGElasticPullToRefresh

Elastic pull to refresh for iOS developed in Swift
https://medium.com/@gontovnik/elastic-view-animation-or-how-i-built-dgelasticpulltorefresh-269a3ba8636e#.9dioekqv6
MIT License
3.77k stars 443 forks source link

1 pixel line between refresh view and collection view #71

Open michaelschwinges opened 7 years ago

michaelschwinges commented 7 years ago

Hi,

A one-pixel line appears at the moment when when releasing - as can be seen in the attached image. It flashes for the briefest moment in time, but my app's contrast between the two colours is very high so it's quite obvious.

Is this in the library or could it be something weird in the way my UI is put together?

screen shot 2017-07-30 at 20 30 17
michaelschwinges commented 7 years ago

Update - doesn't do it on any other collection views in the app. What's different about the screen where this occurs is that there is a header cell with a white background. The top insets are all zero. However with pull to refresh the 1 pixel line must be creeping in somehow when released.

AlexanderKvamme commented 6 years ago

Any solution for this? I found that the color of the line is controlled by the tableView.backgroundColor

michaelschwinges commented 6 years ago

I my case the tableView.backgroundColor is white and the screen background is dark blue. In some cases when bouncing a 1 pixel gap appeared between the tableView and the pullToRefreshView above it.

I eventually solved it by making pullToRefreshView 1 pixel higher than it theoretically needed to be, so that this line would not sometimes appear:

DGElasticPullToRefreshView.swift line 370: