Closed gfzabarino closed 8 years ago
This looks awesome :ok_hand: I want to make sure it actually solves all the edge cases I have encountered in the past, so I'll pull the code and test it right now.
Superb contribution! After testing, I don't see any issues at all with this. Getting rid of code and fixing bugs has got to be the best thing any programmer can contribute :D Cheers!
Glad it worked!
Hey there, I was having an issue on a project I'm working on using this library. The issue was that a table view was being displayed with the wrong
contentOffset
when first loaded. ThecontentInset
was fine though. In my particular case, the contentInset was 108 (20 status bar + 44 nav bar + 44 custom extension view). But after thecontentInset
was set by this library, thecontentOffset
was still using a previous value. I don't exactly know why this happened now (this didn't happened before), but the changes I'm sending fixes the issue.Basically, if by the time the
contentInset
was being set in the beginning thepreserveOffset
flag would have beenYES
, then thecontentOffset
property would have been updated correctly. However, forcing this toYES
caused that when scrolling, thecontentOffset
was being modified as well, causing the amount of points to be scrolled to double.What I did to correct this was to remove this flag and rely on some flags about the scroll view itself.
Does this look good to you? Any thoughts about this PR? Thanks for this awesome library!