Skip to content

Instantly share code, notes, and snippets.

@mattyoung
Created February 15, 2024 22:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattyoung/c1b94d0bfd5067dd2485735a09f49f0b to your computer and use it in GitHub Desktop.
Save mattyoung/c1b94d0bfd5067dd2485735a09f49f0b to your computer and use it in GitHub Desktop.
import SwiftUI
import JunoSlider
struct ContentView: View {
@State var sliderValue: CGFloat = 0.5
@State var isSliderActive = false
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
JunoSlider(sliderValue: $sliderValue, maxSliderValue: 1.0, baseHeight: 10.0, expandedHeight: 22.0, label: "Video volume") { editingChanged in
isSliderActive = editingChanged
}
}
.padding()
}
}
#Preview {
ContentView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment