Answers for "how to add label programmatically to a view in swift"

0

swift create label programmatically

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)
Posted by: Guest on May-21-2020

Code answers related to "how to add label programmatically to a view in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language