Swift code creates the Uilabel of the first control
The control that creates the view is similar to the previous one, with the creation of some views in the viewdidload.
First, set the frame to the label you want to create.
Let Textlabel = UILabel (Frame:cgrectmake (self.view.frame.size.width/8,20,self.view.frame.size.width*3/4,100))
Set a value for a label
Textlabel.text = "Now let's start learning how to create our first Swift control-uilabel"
Set whether to default line wrapping
Textlabel.numberoflines = 0
Set the label's background color
var whitcolor = Uicolor (red:1.0,green:1.0,blue:1.0,alpha:1.0)
Textlabel.backgroundcolor = Whitcolor
Sets the text information presentation style for the label,
Textlabel.textalignment = Nstextalignment.left
Set the font for a label
var textfont = Uifont (Name:nil, Size:11)
Textlabel.font = Textfont
Set the text color of a label
var greencolor = Uicolor (red:0.9,green:0.2,blue:0.6,alpha:1.0)
Textlabel.textcolor = Greencolor
Adding views to view
Self.view.addSubview (Textlabel)
Swift--label