[monotouch-test] Adjust a ShouldAutorotate test to cope with Apple dropping support for 'shouldAutorotate'.

This commit is contained in:
Rolf Bjarne Kvinge 2022-06-28 22:20:22 +02:00
Родитель ff20062685
Коммит 24db3eca11
1 изменённых файлов: 6 добавлений и 1 удалений

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

@ -114,7 +114,12 @@ namespace MonoTouchFixtures {
vc.View.BackgroundColor = UIColor.Green; vc.View.BackgroundColor = UIColor.Green;
}; };
MonoTouchFixtures.AppDelegate.PresentModalViewController (nc, 0.5); MonoTouchFixtures.AppDelegate.PresentModalViewController (nc, 0.5);
if (TestRuntime.CheckXcodeVersion (14, 0)) {
// The 'shouldAutorotate' selector isn't called anymore in iOS 16+ (this is documented in Xcode 14's release notes)
Assert.That (!category_invoked);
} else {
Assert.That (category_invoked); Assert.That (category_invoked);
}
} finally { } finally {
Rotation_IOS6.ShouldAutoRotateCallback = null; Rotation_IOS6.ShouldAutoRotateCallback = null;
} }