Latest Post

Dependency injection in swift SwiftUI interview questions and answer How to display SwiftUI sheet Half screen

Today We are going to show text and image side by side in SwiftUI.This We can only implement in Xcode 13 and above.

Swiftui label image on right

To start with we needed to define the Label in the body of the View

struct Contenview:View {

    var body: some View {

        Label("Leadbycode", systemImage: "folder.circle")

    }

}
image

Swiftui label font change

We can change the font and also the label style in SwiftUI

To Change the Font of the Label We can Use the following code

  Label("Leadbycode", systemImage: "folder.circle").font(.title)

 

 

Screenshot 2B2021 09 17 2Bat 2B7.45.47 2BPM

 

 

To Change the Font of the Label We can Use the following code