コード例 #1
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _text.AtLeftOf(ContentView, 14),
                _text.WithSameCenterY(ContentView),

                _ruler.AtTopOf(ContentView),
                _ruler.AtRightOf(ContentView),
                _ruler.AtLeftOf(ContentView),
                _ruler.Height().EqualTo(1),

                _arrowImage.AtRightOf(ContentView, 14),
                _arrowImage.Height().EqualTo(15),
                _arrowImage.Width().EqualTo(9),
                _arrowImage.WithSameCenterY(ContentView),

                _text.AtRightOf(_arrowImage, 5),

                _bottomRuler.AtBottomOf(ContentView),
                _bottomRuler.AtLeftOf(ContentView),
                _bottomRuler.AtRightOf(ContentView),
                _bottomRuler.Height().EqualTo(1),

                ContentView.Height().EqualTo(50)
                );
        }
コード例 #2
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _text.AtLeftOf(ContentView, 14),
                _text.AtRightOf(ContentView, 14),
                _text.WithSameCenterY(ContentView),

                _ruler.AtTopOf(ContentView),
                _ruler.AtRightOf(ContentView, 14),
                _ruler.AtLeftOf(ContentView, 14),
                _ruler.Height().EqualTo(1),

                ContentView.Height().EqualTo(30)
                );
        }
コード例 #3
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                ContentView.Height().EqualTo(300),

                _backPanelView.AtTopOf(ContentView, 20),
                _backPanelView.AtLeftOf(ContentView, 20),
                _backPanelView.AtRightOf(ContentView, 20),
                _backPanelView.AtBottomOf(ContentView, 20),

                _horizontalLine.WithSameCenterY(_backPanelView),
                _horizontalLine.AtLeftOf(_backPanelView, 10),
                _horizontalLine.AtRightOf(_backPanelView, 10),
                _horizontalLine.Height().EqualTo(1),

                _verticalLine.WithSameCenterX(_backPanelView),
                _verticalLine.AtTopOf(_backPanelView, 10),
                _verticalLine.AtBottomOf(_backPanelView, 10),
                _verticalLine.Width().EqualTo(1),

                _membersButton.AtTopOf(_backPanelView),
                _membersButton.AtLeftOf(_backPanelView),
                _membersButton.AtRightOf(_verticalLine),
                _membersButton.Above(_horizontalLine),

                _eventsButton.AtTopOf(_backPanelView),
                _eventsButton.AtRightOf(_backPanelView),
                _eventsButton.AtLeftOf(_verticalLine),
                _eventsButton.Above(_horizontalLine),

                _groupsButton.AtBottomOf(_backPanelView),
                _groupsButton.AtLeftOf(_backPanelView),
                _groupsButton.AtRightOf(_verticalLine),
                _groupsButton.Below(_horizontalLine),

                _infoButton.AtBottomOf(_backPanelView),
                _infoButton.AtRightOf(_backPanelView),
                _infoButton.AtLeftOf(_verticalLine),
                _infoButton.Below(_horizontalLine)
                );
        }