Swift UI Part 1 Application Life Cycle : :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::CODE::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
VStack{
Text("Hello, Friends!")
Text("Hello World")
.font(.custom("Helvetica-Bold",size: 30.0))
Text("Hello World")
.font(.title) //fony Style
.fontWeight(.thin)// text thikness
.foregroundColor(Color.green) // text Color
.padding(.all) // padding all side
Text("hello World")
.foregroundColor(Color.gray)
.padding() // padding frome all side
.padding() // padding on padding from all side
.background(Color.yellow)// background Color
Text("hello World")
.padding()
.border(Color.red, width: 2)
Text("Hello World")
.font(.largeTitle)
.foregroundColor(Color.white)
.padding()
.background(Color.yellow)
.padding()
.background(Color.green)
.padding()
.background(Color.red)
Text("Hello World with Kerning")
.kerning(5) // the amount of spacing to use between individual charcters in this text
.baselineOffset(5.0) // the amount to shify the text vertically (up or down) in ralation to it baseline.
.bold() // Bold text
.italic() // Italic Text
.strikethrough(true, color: Color.red) // strickethrough and color for it
.underline() // underline
.allowsHitTesting(true) // Transparency of this view.
.background(Color.gray)
.cornerRadius(5.0)
.clipped()
Text("text hello world with heavy weight font with custom yellow color , having 2 number of lines and padding from leading")
.fontWeight(.heavy)
.foregroundColor(Color.yellow)
.lineLimit(2)
.padding(.leading)
.frame(height: 50.0)
Text("Text hello world with ultra light weight font with custom green color, multiline text with leading aligment, having infinite number of lines and padding.")
.font(.subheadline)
.fontWeight(.ultraLight)
.foregroundColor(Color.init(red: 25/255, green: 200/255, blue: 2/255))
.multilineTextAlignment(.leading)
.lineLimit(nil)
.lineSpacing(20.0)
.padding(.all)
Text("Hello World")
.font(.custom("Helvetica-Bold", size: 30.0))
.padding(.all)
.background(Color.red)
}

0 Comments