title: Aligning views in opposite directions in SwiftUI
body: <p>I have run into an issue where I need to align 2 views on opposite ends of a container. E.g. leading and trailing alignment in <code>HStack</code> and top and bottom in <code>ZStack</code>. I've tried everything and it just does not work. Also can't find anything similar on the web. Here is the simplest example</p>
  <pre><code>struct AlignTest: View {
    var body: some View {
      ZStack(alignment: Alignment.top) {
          Color.white
          Color.red.opacity(0.5).frame(width: 50, height: 50)
          Color.blue.opacity(0.5).frame(width: 100, height: 100, alignment: .bottom)
      }
    }
  }
  </code></pre>
  <p>Which produces the result on the image below. It aligns both boxes at the top but I want them to be aligned at the top and the bottom. Can anyone suggest how to do this?</p>
  <p><a href="https://i.stack.imgur.com/9eNAb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9eNAb.png" alt="enter image description here" /></a></p>