目录
目录README.md

YVAnchor

About

Syntax sugar for working with anchors in swift. Now you will never ever forget to activate your constraint or set translatesAutoresizingMaskIntoConstraints parameter 😜

Usage

Instead of this:

subview.translatesAutoresizingMaskIntoConstraints = false
subview.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 30).isActive = true

Use this:

subview.pin(.left, to: view.left, constant: 30)

Example

Sample layout constraints

Animation

Note

Before constraints setup add all subviews to the view hierarchy.

关于
3.1 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号