Пример #1
0
    public void PresentFromRect()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popOver = new UIPopoverController(_controller);
        popOver.PresentFromRect(new CGRect(), new UIView(), UIPopoverArrowDirection.Any, true);
    }
Пример #2
0
    public void NewObjectDispose()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var obj = new UIPopoverController(_controller);
        obj.Dispose();
    }
Пример #3
0
    public void SetContentViewController()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(new UIViewController());
        popover.SetContentViewController(_controller, false);
        Assert.IsNotNull(popover.ContentViewController);
    }
Пример #4
0
    public void ObjectSame()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var a = new UIPopoverController(_controller);
        var b = Runtime.GetNSObject<UIPopoverController>(a.Handle);
        Assert.AreSame(a, b);
    }
Пример #5
0
    public void NewObject()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var obj = new UIPopoverController(_controller);

        Assert.AreNotEqual(IntPtr.Zero, obj.ClassHandle);
        Assert.AreNotEqual(IntPtr.Zero, obj.Handle);
    }
Пример #6
0
    public void Dismiss()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(_controller);
        popover.Dismiss(true);
    }
Пример #7
0
    public void SetPopoverContentSize()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(_controller);
        popover.SetPopoverContentSize(new CGSize(100, 120), true);
        Assert.AreEqual(100, popover.PopoverContentSize.Width);
        Assert.AreEqual(120, popover.PopoverContentSize.Height);
    }
Пример #8
0
    public void PopoverVisible()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(_controller);
        Assert.IsFalse(popover.PopoverVisible);
    }
Пример #9
0
    public void PopoverArrowDirection()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(_controller);
        Assert.AreEqual(UIPopoverArrowDirection.Unknown, popover.PopoverArrowDirection);
    }