Exemplo n.º 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);
    }
Exemplo n.º 2
0
    public void NewObjectDispose()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var obj = new UIPopoverController(_controller);
        obj.Dispose();
    }
Exemplo n.º 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);
    }
Exemplo n.º 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);
    }
Exemplo n.º 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);
    }
Exemplo n.º 6
0
    public void Dismiss()
    {
        if (_device != UIUserInterfaceIdiom.Pad)
        {
            Assert.Inconclusive("Not running on iPad!");
            return;
        }

        var popover = new UIPopoverController(_controller);
        popover.Dismiss(true);
    }
Exemplo n.º 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);
    }
Exemplo n.º 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);
    }
Exemplo n.º 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);
    }