summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.iOS
diff options
context:
space:
mode:
authorE.Z. Hart <hartez@gmail.com>2016-12-06 17:23:22 (GMT)
committerE.Z. Hart <hartez@gmail.com>2016-12-06 17:23:22 (GMT)
commit3d090a33d4c1fb071ccb2ec822ef7fc94ec3f89a (patch)
tree53db5464acf3da77d576e08a273388637fa60090 /Xamarin.Forms.ControlGallery.iOS
parent20e2e12dce2f81b92e8682f128cd81e08469f485 (diff)
downloadxamarin-forms-3d090a33d4c1fb071ccb2ec822ef7fc94ec3f89a.zip
xamarin-forms-3d090a33d4c1fb071ccb2ec822ef7fc94ec3f89a.tar.gz
xamarin-forms-3d090a33d4c1fb071ccb2ec822ef7fc94ec3f89a.tar.bz2
Possible fix for race condition in 21177 UI test
Diffstat (limited to 'Xamarin.Forms.ControlGallery.iOS')
-rw-r--r--Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs
index 5654fa3..706553e 100644
--- a/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs
+++ b/Xamarin.Forms.ControlGallery.iOS/CustomRenderers.cs
@@ -471,6 +471,8 @@ namespace Xamarin.Forms.ControlGallery.iOS
Element.InvokeItemSelected(indexPath.Row);
}
+ CollectionViewController _controller;
+
protected override void OnElementChanged(ElementChangedEventArgs<Bugzilla21177.CollectionView> e)
{
if (e.NewElement != null)
@@ -482,8 +484,8 @@ namespace Xamarin.Forms.ControlGallery.iOS
MinimumInteritemSpacing = 5, // minimum spacing between cells 
MinimumLineSpacing = 5 // minimum spacing between rows if ScrollDirection is Vertical or between columns if Horizontal 
};
- var collectionView = new CollectionViewController(flowLayout, ItemSelected);
- SetNativeControl(collectionView.CollectionView);
+ _controller = new CollectionViewController(flowLayout, ItemSelected);
+ SetNativeControl(_controller.CollectionView);
}
base.OnElementChanged(e);