1

Simply what I'm trying to achieve is this enter image description here

The Circle aligned to the bottom left edge of the other image I know that alignment guides should be used in this scenario, but I truly can't understand the concept, that's what I've done so far.

            ZStack(alignment: .bottom) {
                Image("image_placeholder")
                    .resizable()
                    .frame(width: .infinity, height: 220)
                
                Image("image_placeholder")
                    .resizable()
                    .scaledToFill()
                    .aspectRatio(contentMode: .fit)
                    .frame(width: 200)
                    .clipShape(Circle())
                    .alignmentGuide(.bottom) { d in
                        d[VerticalAlignment.center]
                    }
                    .alignmentGuide(.leading) { d in
                        d[HorizontalAlignment.leading]
                    }
            }

But that code displays image in the center bottom, any help?

user19514005
  • 177
  • 1
  • 7

1 Answers1

1

Change the ZStack alignment to bottomLeading

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jul 06 '23 at 15:19