TLYShyNavBar icon indicating copy to clipboard operation
TLYShyNavBar copied to clipboard

Improved support for swapping scroll views.

Open bizz84 opened this issue 10 years ago • 4 comments

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.

bizz84 avatar Aug 19 '14 15:08 bizz84

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.

Mazyod avatar Aug 20 '14 07:08 Mazyod

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

aasatt avatar Sep 08 '14 03:09 aasatt

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

Mazyod avatar Sep 08 '14 07:09 Mazyod

Same issue

axmav avatar Apr 05 '16 19:04 axmav