diff options
author | Samantha Houts <samantha@teamredwall.com> | 2016-09-13 04:39:36 -0700 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-09-13 12:39:36 +0100 |
commit | d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b (patch) | |
tree | 35a49d9322afeb1269b13333d8adf4548cd34a7b /Xamarin.Forms.Platform.iOS | |
parent | 06698acfb981431e44b9b1444823033dfffac3ee (diff) | |
download | xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.tar.gz xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.tar.bz2 xamarin-forms-d8f939ff6eee0a8f2ecc9392cbdb898e3d140d8b.zip |
[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
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Cells/ViewCellRenderer.cs | 11 |
1 files changed, 6 insertions, 5 deletions
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); |