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

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift