示例#1
0
        public void SetUp()
        {
            window = new TestWindow(
                new CGRect(0, 0, 400, 400)
                );

            view = new TestView();
            window.AddSubview(view);

            Constrain(view, (v) =>
            {
                v.Height.Equals(200);
                v.Width.Equals(200);
            });
        }
示例#2
0
        public void SetUp()
        {
            window = new TestWindow(
                CGRect.FromLTRB(0, 0, 400, 400)
                );

            viewA = new TestView();
            window.AddSubview(viewA);

            viewB = new TestView();
            window.AddSubview(viewB);

            viewC = new TestView();
            window.AddSubview(viewC);

            Constrain(viewA, (a) =>
            {
                a.Width.Equal(100);
                a.Height.Equal(200);

                a.Top.Equal(a.Superview.Top + 10);
                a.Left.Equal(a.Superview.Left + 10);
            });
        }