I'm having the same issue. Have you figured this out yet?
Post
Replies
Boosts
Views
Activity
I have not tried Geometry reader yet as I am just trying to understand the basic behaviour and what the heck is going on. I realize the text within each hstack is aligned topleading however that is not my concern. The zstack alignment is top leading so from my understanding every child (hstack's) should be aligned to the top leading edge of the zstack. This is the case when I add the fisrt hstack. It aligns to the top leading edge as expected. However as soon as the second hstack is added the e first hstack centers in the zstack view. I expect both hstacks to align to top leading since they are both children of the zstack which has a top leading alignment modifier.I would love to show you the images but can't figure out how to add images to this thread.
The Z Stack alignment is what I'm concerned with. If you have a single view in the Z Stack it will align as expected. As soon as you add a second view everything changes. I tried to add an image to demonstrate but it isn't showing.
After a ton of experimenting I found I can make it work if the HStack frames are set to the exact same size as the ZStack frame. This works for me in my situation but it still seems like a bug. In the above example if stack 1 is by itself then it moves to top leading. But as soon as you add stack 2 then stack 1 goes to centered.