[monotouch-test] Workaround issue with UIPasteboard.General.Images.

Ref: 71f9341c59
Ref: https://github.com/xamarin/xamarin-macios/issues/6254
This commit is contained in:
Rolf Bjarne Kvinge 2019-06-14 11:15:45 +02:00
Родитель 1d85078962
Коммит f0958ac24f
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -32,6 +32,13 @@ namespace MonoTouchFixtures.UIKit {
using (var cgimg = CGImage.FromPNG (dp, null, false, CGColorRenderingIntent.Default)) {
using (var img = new UIImage (cgimg)) {
UIPasteboard.General.Images = new UIImage[] { img };
if (TestRuntime.CheckXcodeVersion (8, 0))
Assert.True (UIPasteboard.General.HasImages, "HasImages");
// https://github.com/xamarin/xamarin-macios/issues/6254
if (TestRuntime.CheckXcodeVersion (11, 0))
return;
Assert.AreEqual (1, UIPasteboard.General.Images.Length, "a - length");
UIPasteboard.General.Images = new UIImage[] { img, img };