-
-
Save sturdysturge/7fb96bc447f3a59e7cea684f2461365f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@State var model = ViewModel.shared | |
var body: some View { | |
VStack { | |
Slider(value: | |
$model.width, in: 1...200) | |
Rectangle() | |
.frame(maxWidth: model.width, maxHeight: .infinity) | |
.foregroundColor(.red) | |
} | |
} | |
} | |
#Preview { ContentView() } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment