Is it possible to have different background color for the top and bottom of a ScrollView?
For example, I when I scroll upwards, I'd like the green background of the ScrollView to be blue, and when I scroll downwards I'd like the green background of the ScrollView to be red:
CodePudding user response:
Yes, replace your background with this:
.background(VStack(spacing: .zero) { Color.blue; Color.red })