ENH: ScrollViewReader with full-space background colour
This commit is contained in:
parent
4abda00033
commit
2b61760d94
1 changed files with 47 additions and 41 deletions
|
@ -41,6 +41,10 @@ struct ContentView: View {
|
||||||
self.imageHeight = height
|
self.imageHeight = height
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZStack {
|
||||||
|
Color.black
|
||||||
|
.ignoresSafeArea()
|
||||||
|
|
||||||
// ScrollView fills remaining height
|
// ScrollView fills remaining height
|
||||||
ScrollViewReader { proxy in
|
ScrollViewReader { proxy in
|
||||||
ScrollView {
|
ScrollView {
|
||||||
|
@ -51,6 +55,7 @@ struct ContentView: View {
|
||||||
Text(lines[index])
|
Text(lines[index])
|
||||||
.font(.system(.body, design: .monospaced))
|
.font(.system(.body, design: .monospaced))
|
||||||
.frame(maxWidth: .infinity, alignment: .leading)
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Color.clear.frame(height: 1).id("bottom")
|
Color.clear.frame(height: 1).id("bottom")
|
||||||
|
@ -86,6 +91,7 @@ struct ContentView: View {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
HStack {
|
HStack {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue