summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authorJimmy Garrido <jimmygarrido@outlook.com>2017-01-21 00:36:59 (GMT)
committerRui Marinho <me@ruimarinho.net>2017-01-21 00:36:59 (GMT)
commitc9b384ce1890979efc4fdcbcd6cdca44b89bb530 (patch)
tree127cb8e90b7f7f6edd264ad9839f55cbfae7b4e8 /Xamarin.Forms.Platform.iOS
parenta11e4c638b105c4d6466894c57a357c893996116 (diff)
downloadxamarin-forms-c9b384ce1890979efc4fdcbcd6cdca44b89bb530.zip
xamarin-forms-c9b384ce1890979efc4fdcbcd6cdca44b89bb530.tar.gz
xamarin-forms-c9b384ce1890979efc4fdcbcd6cdca44b89bb530.tar.bz2
[iOS] Fix NRE when re-adding header/footer (#702)
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
index 3871c5c..3c23580 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/ListViewRenderer.cs
@@ -414,6 +414,8 @@ namespace Xamarin.Forms.Platform.iOS
else if (_footerRenderer != null)
{
Control.TableFooterView = null;
+ _footerRenderer.Element.MeasureInvalidated -= OnFooterMeasureInvalidated;
+
var platform = _footerRenderer.Element.Platform as Platform;
if (platform != null)
platform.DisposeModelAndChildrenRenderers(_footerRenderer.Element);
@@ -458,6 +460,8 @@ namespace Xamarin.Forms.Platform.iOS
else if (_headerRenderer != null)
{
Control.TableHeaderView = null;
+ _headerRenderer.Element.MeasureInvalidated -= OnHeaderMeasureInvalidated;
+
var platform = _headerRenderer.Element.Platform as Platform;
if (platform != null)
platform.DisposeModelAndChildrenRenderers(_headerRenderer.Element);