Ejemplo n.º 1
0
        public void PresentsWithGesture()
        {
            // UISplitViewController feature is only available on iPads
            // and we (presently) crash on devices when an objective-c exception is thrown
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone)
            {
                return;
            }

            TestRuntime.IgnoreOnTVOS();

            using (UISplitViewController svc = new UISplitViewController()) {
                Assert.True(svc.PresentsWithGesture, "PresentsWithGesture/default");
            }
        }
Ejemplo n.º 2
0
        public void NavigationControllerOverride()
        {
            TestRuntime.IgnoreOnTVOS();              // shouldAutorotate is not available on TVOS.

            try {
                bool category_invoked = false;
                var  vc = new UIViewController();
                vc.View.BackgroundColor = UIColor.Yellow;
                var nc = new UINavigationController(vc);
                Rotation_IOS6.ShouldAutoRotateCallback = () => {
                    category_invoked        = true;
                    vc.View.BackgroundColor = UIColor.Green;
                };
                MonoTouchFixtures.AppDelegate.PresentModalViewController(nc, 0.5);
                Assert.That(category_invoked);
            } finally {
                Rotation_IOS6.ShouldAutoRotateCallback = null;
            }
        }