summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorRui Marinho <me@ruimarinho.net>2016-05-26 20:05:14 +0100
committerJason Smith <jason.smith@xamarin.com>2016-05-26 12:05:14 -0700
commit349336dbf12fb158f7731ece7fb1524cb1f5808a (patch)
tree5f9f70d20b6ba4aaf0a3a17040381f18e16f8783 /Xamarin.Forms.Platform.iOS
parentc502f47980882e61402f77a55236653a22f706ab (diff)
downloadxamarin-forms-349336dbf12fb158f7731ece7fb1524cb1f5808a.tar.gz
xamarin-forms-349336dbf12fb158f7731ece7fb1524cb1f5808a.tar.bz2
xamarin-forms-349336dbf12fb158f7731ece7fb1524cb1f5808a.zip
Fix margins on ViewCell (#189)
* [iOS] Set the frame of a cell NativeView using the calculated positions and size * [UWP] Make wrapper of a ViewCell respect margins
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs
index 54f3c1e0..9493c8fb 100644
--- a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs
@@ -91,15 +91,16 @@ namespace Xamarin.Forms.Platform.iOS
base.LayoutSubviews();
var contentFrame = ContentView.Frame;
+ var view = ViewCell.View;
- Layout.LayoutChildIntoBoundingRegion(ViewCell.View, contentFrame.ToRectangle());
+ Layout.LayoutChildIntoBoundingRegion(view, contentFrame.ToRectangle());
if (_rendererRef == null)
return;
IVisualElementRenderer renderer;
if (_rendererRef.TryGetTarget(out renderer))
- renderer.NativeView.Frame = contentFrame;
+ renderer.NativeView.Frame = view.Bounds.ToRectangleF();
}
public override SizeF SizeThatFits(SizeF size)