Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
Measuring Computed View Size
If you want to render it on-screen, you could do something like tacking on:// ...
.background(Color.red)
.overlay(
GeometryReader { g in
Text(...) // use g.size
}Or if you feel like making your brain hurt: var body: some View {
GeometryReader { g in
Text("\(g.size.width)") // The size of what?
.font(.title)
.foregroundColor(.white)
.padding()
.background(Color.red)
.fixedSize()
}
}(The "Building Custom Views..." session is fantastic, but I'm _really_ looking forward to more documentation about the layout process...)