diff options
author | Samantha Houts <samhouts@users.noreply.github.com> | 2017-09-15 18:52:24 -0700 |
---|---|---|
committer | Samantha Houts <samantha.houts@xamarin.com> | 2017-09-15 18:52:50 -0700 |
commit | c1095f45a994f5b8ba4e6ca6e44cccb3dffeef95 (patch) | |
tree | df4292fd1bb8a490b0140378769537b4ac037323 /Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs | |
parent | 352773a8432033fa384b8d1e841f0987d175f93b (diff) | |
download | xamarin-forms-c1095f45a994f5b8ba4e6ca6e44cccb3dffeef95.tar.gz xamarin-forms-c1095f45a994f5b8ba4e6ca6e44cccb3dffeef95.tar.bz2 xamarin-forms-c1095f45a994f5b8ba4e6ca6e44cccb3dffeef95.zip |
[iOS] Can activate ContextActions on ListViews reliably again (#1144)
* Add ContextActions test category
* Add repro for 58875
* [iOS] Null check for the Delegate; clear the static WeakRef on dispose
Diffstat (limited to 'Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs b/Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs index e0e00c58..22f57fc3 100644 --- a/Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs +++ b/Xamarin.Forms.Platform.iOS/ContextScrollViewDelegate.cs @@ -203,7 +203,9 @@ namespace Xamarin.Forms.Platform.iOS return false; UIScrollView scrollViewBeingScrolled; - if (!s_scrollViewBeingScrolled.TryGetTarget(out scrollViewBeingScrolled) || ReferenceEquals(scrollViewBeingScrolled, scrollView) || !ReferenceEquals(((ContextScrollViewDelegate)scrollViewBeingScrolled.Delegate)._table, ((ContextScrollViewDelegate)scrollView.Delegate)._table)) + if (!s_scrollViewBeingScrolled.TryGetTarget(out scrollViewBeingScrolled) + || ReferenceEquals(scrollViewBeingScrolled, scrollView) + || !ReferenceEquals(((ContextScrollViewDelegate)scrollViewBeingScrolled.Delegate)?._table, ((ContextScrollViewDelegate)scrollView.Delegate)?._table)) return false; scrollView.SetContentOffset(new PointF(0, 0), false); @@ -221,6 +223,7 @@ namespace Xamarin.Forms.Platform.iOS { ClosedCallback = null; + s_scrollViewBeingScrolled = null; _table = null; _backgroundView = null; _container = null; |