Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

maintainContentOffsetAfterReload with more than one section #76

Open
cHoco opened this Issue · 6 comments

4 participants

@cHoco

While I was investigating for a fix on the scaling bug, I noticed that the content offset is preserved only on the first section of a TUITableView. Is this the intended behavior or should we find a fix ? If so I could take a look :)

@cHoco

After taking a deeper look tonight I think that this is the correct behavior (or at least what Loren wanted when coded this), but I think we should change the property name to something more appropriate like maintainScrollOffsetAfterReload since it isn't the content that we are preserving, but the scrolled position.
The content itself is preserved without using this property.

Maybe @joshaber or @jspahrsummers can enlighten us :)

@jwilling

But what's the use of maintaining merely the scroll offset? When new data is added, it would make more sense to have the offset be expanded a bit to keep the current content on-screen, no?

@jspahrsummers

@cHoco maintainContentOffsetAfterReload is consistent with the naming of TUIScrollView.contentOffset.

@cHoco

@jwilling I wouldn't consider the actual implementation a bug because right now, in TUITableView the content offset corresponds just to the scroll offset, for example if we scrolled 50 pixels from the top, after the reload we would stay scrolled 50 pixels. Instead if this property isn't set when new data is added, the tableview tries to keep the current content on-screen.

That's why I was arguing about the property name, describing it as content may be confusing, but that's just my opinion.

@cHoco
@galaxas0

I agree with what @cHoco says to the effect that it may confuse developers. I too, mixed up the meaning of the method, and after reading this, and a bit of testing, I realized the difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.