SwiftUI create label iOS

Solution:

You can create one view and call it inside the contentView using the below code.
The below code can return and label with fullView width and leading alignment.

struct labelView: View {

    @State var labelTitle:String!

    

    var body: some View {

        let label = Text(labelTitle).frame(minWidth: 0, maxWidth: .infinity,alignment: .leading)

        return label

    }

}

Comments

Popular posts from this blog

store cgpoint in userdefaults iOS swift

Invalid bundle error while upload the app to the app Store