Это то, что я попробовал, но не работал < /p>
struct CustomView: View {
var body: some View {
Text("Hello, this is just a Text content with multiple line")
.overlay(alignment: .trailingLastTextBaseline) {
TextWithButtonView()
}
}
}
< /code>
struct TextWithButtonView: View {
@State private var message = "Initial Text"
var body: some View {
VStack(spacing: 20) {
Text(message)
Button(action: {
message = "Button was tapped!"
}) {
Text("Tap Me")
}
}
}
< /code>
This is what I would like to do:

Подробнее здесь: https://stackoverflow.com/questions/796 ... iftui-view