Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Improved support for swapping scroll views. #26

Open
bizz84 opened this issue Aug 19, 2014 · 4 comments
Open

Improved support for swapping scroll views. #26

bizz84 opened this issue Aug 19, 2014 · 4 comments

Comments

@bizz84
Copy link

bizz84 commented Aug 19, 2014

Use Case:
My Extension view contains a toggle that I use to switch between two content scroll views. Both scroll views should appear just below my extension view, however when I toggle between them (and assign the newly visible scroll view to the shy nav bar), the content insets of the new scroll view are not updated according to the height of the extension view.

In an attempt to fix this I have exposed the layoutViews method in my client code, so that I can invoke it when I swap the scrollViews, however the content inset of the new scroll view is not set because UIEdgeInsetsEqualToEdgeInsets(scrollInsets, self.previousScrollInsets) causes the method to return. Setting previousScrollInsets to UIEdgeInsetsZero prior to this seems to do it, however it feels like a hacky solution so would like to raise this so that a proper fix can be devised.

@Mazyod
Copy link
Contributor

Mazyod commented Aug 20, 2014

This is a delicate issue, since the component is doing its best to avoid unnecessary revalidation, but the user should be able to force it. We possibly need to add a public method invalidateContentOffset or something similar, and call it if the scrollView is changed as well, if that is not currently the case.

@aasatt
Copy link
Contributor

aasatt commented Sep 8, 2014

Having the same issue. Any status on if/when this will be implemented?

@Mazyod
Copy link
Contributor

Mazyod commented Sep 8, 2014

@aasatt I honestly don't have immediate plans to work through this specific issue, but it's definitely important to fix some day.

@axmav
Copy link

axmav commented Apr 5, 2016

Same issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants