[monotouch-test] Adjust a ShouldAutorotate test to cope with Apple dropping support for 'shouldAutorotate'.
This commit is contained in:
Родитель
ff20062685
Коммит
24db3eca11
|
@ -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);
|
||||||
Assert.That (category_invoked);
|
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);
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
Rotation_IOS6.ShouldAutoRotateCallback = null;
|
Rotation_IOS6.ShouldAutoRotateCallback = null;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче