Пример #1
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _topRuler.AtTopOf(ContentView),
                _topRuler.AtRightOf(ContentView, 0),
                _topRuler.AtLeftOf(ContentView, 0),
                _topRuler.Height().EqualTo(1),

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

                _avatar.AtTopOf(ContentView, 10),
                _avatar.AtLeftOf(ContentView, 10),
                _avatar.Height().EqualTo(50),
                _avatar.Width().EqualTo(50),
                _avatar.AtBottomOf(ContentView, 10),

                _displayName.WithSameCenterY(_avatar),
                _displayName.ToRightOf(_avatar, 10)
                );
        }
Пример #2
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _imageView.AtLeftOf(ContentView, 14),
                _imageView.AtTopOf(ContentView, 10),
                _imageView.AtBottomOf(ContentView, 10),
                _imageView.Width().EqualTo(30),
                _imageView.Height().EqualTo(30),

                _text.ToRightOf(_imageView, 10),
                _text.WithSameCenterY(_imageView),
                _text.ToLeftOf(_arrow, 10),

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

                _topRuler.AtTopOf(ContentView),
                _topRuler.AtLeftOf(ContentView),
                _topRuler.AtRightOf(ContentView),
                _topRuler.Height().EqualTo(1)
                );
        }
Пример #3
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _imageView.AtTopOf(ContentView),
                _imageView.AtLeftOf(ContentView),
                _imageView.AtBottomOf(ContentView),
                _imageView.AtRightOf(ContentView)
                );
        }
Пример #4
0
        private void SetupConstraints()
        {
            ContentView.SubviewsDoNotTranslateAutoresizingMaskIntoConstraints();

            ContentView.AddConstraints(
                _imageView.AtTopOf(ContentView, 10),
                _imageView.AtLeftOf(ContentView, 10),
                _imageView.AtBottomOf(ContentView, 10),
                _imageView.AtRightOf(ContentView, 10),
                _imageView.Height().EqualTo(80),
                _imageView.Width().EqualTo(80)
                );
        }