summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorStephane Delcroix <stephane@delcroix.org>2016-10-04 09:34:35 +0200
committerStephane Delcroix <stephane@delcroix.org>2016-10-04 09:34:35 +0200
commitd34dcf2cbc9dec01c806b64707bbf99c8c58cc8a (patch)
treeb4ff299bb257ddd47f06ef8289b17b31d8bd96db /Xamarin.Forms.Platform.iOS
parentbd195ffe10e713393b9eaaff4f0720227e3ea9c9 (diff)
parente9606cd6e2bbe60b20d189682c2527751555820a (diff)
downloadxamarin-forms-d34dcf2cbc9dec01c806b64707bbf99c8c58cc8a.tar.gz
xamarin-forms-d34dcf2cbc9dec01c806b64707bbf99c8c58cc8a.tar.bz2
xamarin-forms-d34dcf2cbc9dec01c806b64707bbf99c8c58cc8a.zip
Merge branch 'ios-scrolltoposition' of https://github.com/adrianknight89/Xamarin.Forms into adrianknight89-ios-scrolltoposition
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/ScrollViewRenderer.cs4
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: