I have the following view for each of the cells used in the List view....:
var body: some View {
VStack {
HStack {
Text("item: \(item.name)")
Text("Some text")
Spacer()
}
HStack {
Image(systemName: "squareshape.fill")
.resizable()
.frame(width: 30, height: 30)
Spacer()
}
}
}
Looks like this:
I want to align the black square to the Some text leading edge found in the previous HStack. I annotated the image to visually show where the black square should land for clarity.
I have looked at a couple of similar questions that might have the solution in it but I haven't been able to apply what I saw to my need here yet. I believe I need to use alignment guides, but, I am not sure how to actually apply such change.
I think I could break the layout out differently where I could be using VStacks etc... but, I want to know how to tell a view to align itself to another in this case across HStacks...
How could I accomplish what outlined?

