Swift 自动布局

pod ‘SnapKit’, ‘~> 0.19.1’

self.addSubview(textField)

    textField.snp_makeConstraints { (make) -> Void in
        make.left.equalTo(10)
        make.right.equalTo(lastBtn.snp_left).offset(-10)
        make.top.equalTo(10)
        make.bottom.equalTo(self.snp_bottom).offset(-10)
    }

你可能感兴趣的:(swift,布局)