summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs
diff options
context:
space:
mode:
authorJason Smith <jason.smith@xamarin.com>2016-12-09 10:17:27 -0800
committerJason Smith <jason.smith@xamarin.com>2016-12-09 10:17:27 -0800
commit899e2bd591bf33cf99c1db95666f1313ff80565b (patch)
tree5f8712401e45895c8aaf79ce8674f76c7f387967 /Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs
parentc4b1c88f506ebf76a2a40f005b45ec9b24e46e1a (diff)
downloadxamarin-forms-899e2bd591bf33cf99c1db95666f1313ff80565b.tar.gz
xamarin-forms-899e2bd591bf33cf99c1db95666f1313ff80565b.tar.bz2
xamarin-forms-899e2bd591bf33cf99c1db95666f1313ff80565b.zip
Revert "Deprecate iOS 8 and earlier (#626)"
This reverts commit c4b1c88f506ebf76a2a40f005b45ec9b24e46e1a.
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs
index 0009acea..725ef51f 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/TableViewRenderer.cs
@@ -73,7 +73,8 @@ namespace Xamarin.Forms.Platform.iOS
_originalBackgroundView = tv.BackgroundView;
SetNativeControl(tv);
- tv.CellLayoutMarginsFollowReadableWidth = false;
+ if (Forms.IsiOS9OrNewer)
+ tv.CellLayoutMarginsFollowReadableWidth = false;
_insetTracker = new KeyboardInsetTracker(tv, () => Control.Window, insets => Control.ContentInset = Control.ScrollIndicatorInsets = insets, point =>
{
@@ -133,9 +134,10 @@ namespace Xamarin.Forms.Platform.iOS
void UpdateRowHeight()
{
var rowHeight = Element.RowHeight;
- if (Element.HasUnevenRows && rowHeight == -1)
- Control.RowHeight = UITableView.AutomaticDimension;
- else
+ if (Element.HasUnevenRows && rowHeight == -1 && Forms.IsiOS7OrNewer) {
+ if (Forms.IsiOS8OrNewer)
+ Control.RowHeight = UITableView.AutomaticDimension;
+ } else
Control.RowHeight = rowHeight <= 0 ? DefaultRowHeight : rowHeight;
}
@@ -145,7 +147,8 @@ namespace Xamarin.Forms.Platform.iOS
if (Element.HasUnevenRows && rowHeight == -1) {
Control.EstimatedRowHeight = DefaultRowHeight;
} else {
- Control.EstimatedRowHeight = 0;
+ if (Forms.IsiOS7OrNewer)
+ Control.EstimatedRowHeight = 0;
}
}
}