From d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b Mon Sep 17 00:00:00 2001 From: Samantha Houts Date: Tue, 13 Sep 2016 04:39:36 -0700 Subject: [iOS] ViewCells with Accessories will be properly laid out again (#338) * Add repro for 43161 * [iOS] Don't adjust ViewCell Bounds when there is an Accessory * [iOS] Fix spacing --- Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Xamarin.Forms.Platform.iOS') diff --git a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs index 4e7323b7..d1cd9399 100644 --- a/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs @@ -90,7 +90,8 @@ namespace Xamarin.Forms.Platform.iOS //This sets the content views frame. base.LayoutSubviews(); - if (SupressSeparator) + //TODO: Determine how best to hide the separator line when there is an accessory on the cell + if (SupressSeparator && Accessory == UITableViewCellAccessory.None) { var oldFrame = Frame; ContentView.Bounds = new RectangleF(oldFrame.Location, new SizeF(oldFrame.Width, oldFrame.Height + 0.5f)); @@ -115,10 +116,10 @@ namespace Xamarin.Forms.Platform.iOS if (!_rendererRef.TryGetTarget(out renderer)) return base.SizeThatFits(size); - if (renderer.Element == null) - return SizeF.Empty; - - double width = size.Width; + if (renderer.Element == null) + return SizeF.Empty; + + double width = size.Width; var height = size.Height > 0 ? size.Height : double.PositiveInfinity; var result = renderer.Element.Measure(width, height); -- cgit v1.2.3