79090789

Date: 2024-10-15 16:03:16
Score: 0.5
Natty:
Report link

Another approach is to use alignment for the ZStack instead of spacer. You will ensure that the elements will be aligned/overlayed starting from the top in this example.

    ZStack(alignment: .top) {
        Text("Hello, World!")
        
        VStack {
            Image(...)
        }
    }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Fares Benhamouda