title: How to find the frame of a SwiftUI UIViewRepresentable
body: <p>I'm trying to wrap a custom subclass of <code>UILabel</code> in <code>UIViewRepresentable</code> to use it in SwiftUI. I'm using <code>.sizeToFit</code> and printing the frame, and it looks right while it's in the wrapper:</p>
  <pre><code>func makeUIView(context: Context) -&gt; CustomUILabel {
      let view = CustomUILabel()
      view.customProperty = model.customProperty
      view.sizeToFit()
      print(model.latex,view.frame.size) // this prints the correct size, how to propagate?
      return view
  }
  </code></pre>
  <p>but when I run this in a <code>VStack</code>, it draws the <code>UIViewRepresentable</code> with the maximum space possible.</p>
  <pre><code>var body: some View {
      GeometryReader{ geometry in
          VStack(spacing: 0){
              Rectangle()
                  .fill(Color.red)
                  .frame( height: geometry.size.height/2 - 5 + self.draggedOffset.height)
              Rectangle()
                  .fill(Color.orange)
                  .frame(height: 10)
              custonView(model:self.model)
              Spacer()
      }
  }
  </code></pre>
  <p>Is there a way to propagate the size of the <code>UIView</code> to its parent, similar to how you use preference keys on a native <code>SwiftUI</code> view?</p>