diff options
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs index b2107db7..3d38bb6b 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs @@ -196,6 +196,10 @@ namespace Xamarin.Forms.Platform.iOS else { var positionOnScroll = Controller.GetScrollPositionForElement(e.Element as VisualElement, e.Position); + + positionOnScroll.X = positionOnScroll.X.Clamp(0, ContentSize.Width - Bounds.Size.Width); + positionOnScroll.Y = positionOnScroll.Y.Clamp(0, ContentSize.Height - Bounds.Size.Height); + switch (ScrollView.Orientation) { case ScrollOrientation.Horizontal: |