diff options
author | Stephane Delcroix <stephane@delcroix.org> | 2016-10-11 20:34:18 +0200 |
---|---|---|
committer | Stephane Delcroix <stephane@delcroix.org> | 2016-10-11 20:34:18 +0200 |
commit | ec81d3f32af7636a2b90484b1d9c8138c346303a (patch) | |
tree | 76c6dea0b7435705b3c5ec63675b9624018f8841 /Xamarin.Forms.Platform.iOS | |
parent | d5f4aeb4745e0b1e171275b7311b9e7a8d98d02d (diff) | |
parent | d34dcf2cbc9dec01c806b64707bbf99c8c58cc8a (diff) | |
download | xamarin-forms-ec81d3f32af7636a2b90484b1d9c8138c346303a.tar.gz xamarin-forms-ec81d3f32af7636a2b90484b1d9c8138c346303a.tar.bz2 xamarin-forms-ec81d3f32af7636a2b90484b1d9c8138c346303a.zip |
Merge branch 'adrianknight89-ios-scrolltoposition'
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-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: |