mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-29 12:07:38 +02:00
Xcode 11 beta 6
This commit is contained in:
@@ -5,9 +5,9 @@ struct TimeTravelBarView : View {
|
||||
@EnvironmentObject var store: Store<TodoState>
|
||||
|
||||
var body: some View {
|
||||
let indexBinding = Binding<Double>(
|
||||
getValue: { Double(self.store.currentStateIndex) },
|
||||
setValue: { self.store.currentStateIndex = Int($0) })
|
||||
let indexBinding = Binding(
|
||||
get: { Double(self.store.currentStateIndex) },
|
||||
set: { self.store.currentStateIndex = Int($0) })
|
||||
|
||||
return Slider(value: indexBinding, in: 0...Double(store.stateCount-1))
|
||||
.background(Color.white)
|
||||
|
||||
Reference in New Issue
Block a user