I want to use HStack to get the actual width position on the UIScreen up to the left edge of the background of the text "Apple". What should I do?
struct ContentView: View {
var body: some View {
HStack {
Text("SwiftUI")
.font(.largeTitle)
.frame(width:150)
.background(Color.green)
Text("Apple")
.font(.largeTitle)
.frame(width:200)
.background(Color.yellow)
}
}
}