You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an issue on iOS where a scrollview size is not updated when it's content changes (hiding or showing children, etc).
I found a fix for this problem here but this handler only fires when the size increases. When we hide the content again the scrollview does not shrink back to it's original size and leaves space at the bottom of the page.
How can I get this to fire when the size decreases as well?
ScrollViewHandler.Mapper.AppendToMapping("ContentSize", (handler, view) =>
{
var contentSize = handler.VirtualView.ContentSize;
var size = new Size(contentSize.Width + view.Padding.HorizontalThickness, contentSize.Height + view.Padding.VerticalThickness);
handler.PlatformView.UpdateContentSize(size);
handler.PlatformArrange(handler.PlatformView.Frame.ToRectangle());
});`
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We have an issue on iOS where a scrollview size is not updated when it's content changes (hiding or showing children, etc).
I found a fix for this problem here but this handler only fires when the size increases. When we hide the content again the scrollview does not shrink back to it's original size and leaves space at the bottom of the page.
How can I get this to fire when the size decreases as well?
ScrollViewHandler.Mapper.AppendToMapping("ContentSize", (handler, view) =>
{
var contentSize = handler.VirtualView.ContentSize;
var size = new Size(contentSize.Width + view.Padding.HorizontalThickness, contentSize.Height + view.Padding.VerticalThickness);
handler.PlatformView.UpdateContentSize(size);
handler.PlatformArrange(handler.PlatformView.Frame.ToRectangle());
});`
Thank you :)
Beta Was this translation helpful? Give feedback.
All reactions