uilabel

   
var label: UILabel = UILabel()
label.frame = CGRectMake(50, 50, 200, 21)
label.backgroundColor = UIColor.blackColor()
label.textColor = UIColor.whiteColor()
label.textAlignment = NSTextAlignment.Center
label..numberOfLines = 0
label.text = "test label"
self.view.addSubview(label)

Multiline

label.lineBreakMode = .ByWordWrapping
label.numberOfLines = 0

Tags: