📜  快速约束中心垂直 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.509000             🧑  作者: Mango

代码示例1
label.widthAnchor.constraint(equalToConstant: 250).isActive = true
label.heightAnchor.constraint(equalToConstant: 100).isActive = true
label.centerXAnchor.constraint(equalTo: self.tableView.centerXAnchor).isActive = true
label.centerYAnchor.constraint(equalTo: self.tableView.centerYAnchor).isActive = true