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
Post a Comment