Check out example codes for "swift create label programmatically". It will help you in understanding the concepts better.

Code Example 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)

Learn ReactJs, React Native from akashmittal.com