Open modplug opened 3 years ago
As workaround you could create a CustomRenderer
[assembly: ExportRenderer (typeof(ScrollView), typeof(CustomScrollViewRenderer))]
namespace InconsistentScrollView.iOS
{
public class CustomScrollViewRenderer : ScrollViewRenderer
{
protected override void OnElementChanged(VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
if (e.OldElement != null) {
// Unsubscribe from event handlers and cleanup any resources
}
if (e.NewElement != null) {
// Configure the native control and subscribe to event handlers
ContentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentBehavior.Never;
}
}
}
}
when iOsSpecific:Page.UseSafeArea="false"
is set on the PageLevel, a ScrollView should have a different ContentInsetAdjustmentBehavior
.
I guess similar issues exists for CollectionView and ListView
Doesn't seem to happen with a CollectionView, so using a CollectionView's Header instead of the ScrollView worked for me. EDIT: This doesn't work on android because of #12065
Description
ScrollView on iOS does not layout correctly when NavigationBar is hidden.
Steps to Reproduce
Expected Behavior
The scrollview should fill the entire page and not be vertically scrollable.
Actual Behavior
When the navigation bar is hidden it leaves empty space at the top which is not getting consumed by the scrollview.
Basic Information
Screenshots
iOS: https://user-images.githubusercontent.com/789588/107773492-038e7600-6d3e-11eb-8bab-b2dff56dd7c6.mov
Android: https://user-images.githubusercontent.com/789588/107773520-0e490b00-6d3e-11eb-8b3f-e38f402a2994.mov
Reproduction Link
https://github.com/modplug/InconsistentScrollViewBehavior
Workaround
I have not been able to find a workaround. Please help 🏋️♂️