📌  相关文章
📜  以编程方式快速创建标签 - Swift 代码示例

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

代码示例1
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 21))
label.center = CGPoint(x: 160, y: 285)
label.textAlignment = .center
label.text = "I'm a test label"
self.view.addSubview(label)