Add Async image loading

This commit is contained in:
Ivan Vorobei
2019-06-06 22:24:34 +03:00
parent dbabd124fb
commit bcedea412a
914 changed files with 164 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
import SwiftUI
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) })
return Slider(value: indexBinding, from: 0, through: Double(store.stateCount-1))
.background(Color.white)
.frame(height: 44.0, alignment: .bottom)
.padding()
}
}
#if DEBUG
struct TimeTravelBarView_Previews : PreviewProvider {
static var previews: some View {
TimeTravelBarView()
}
}
#endif