Minimum changes for Xcode 11 beta 5

This commit is contained in:
John Holdsworth
2019-07-31 14:11:25 +01:00
parent 7af0a711da
commit a36ff1b7ca
48 changed files with 209 additions and 114 deletions

View File

@@ -9,7 +9,7 @@ struct TimeTravelBarView : View {
getValue: { Double(self.store.currentStateIndex) },
setValue: { self.store.currentStateIndex = Int($0) })
return Slider(value: indexBinding, from: 0, through: Double(store.stateCount-1))
return Slider(value: indexBinding, in: 0...Double(store.stateCount-1))
.background(Color.white)
.frame(height: 44.0, alignment: .bottom)
.padding()

View File

@@ -11,7 +11,7 @@ struct AddItemView: View {
setValue: { self.store.dispatch(event: .changePartialItemName($0)) })
return VStack(spacing: 16) {
TextField(textBinding, placeholder: Text("Title"))
TextField("Title", text: textBinding)
Button(action: {
self.store.dispatch(event: .addItem)
}) {
@@ -22,7 +22,7 @@ struct AddItemView: View {
}
}
.relativeWidth(1.0)
// .relativeWidth(1.0)
.background(Color.accentColor)
.disabled(store.state.partialItemName.isEmpty)
.foregroundColor(.white)

View File

@@ -7,8 +7,8 @@ struct ModalDimmingView : View {
var body: some View {
Color
.black
.relativeWidth(1.0)
.relativeHeight(1.0)
// .relativeWidth(1.0)
// .relativeHeight(1.0)
.opacity(0.3)
.edgesIgnoringSafeArea([.bottom, .top])
.transition(.opacity)

View File

@@ -8,8 +8,8 @@ struct TodoListItemView : View {
var body: some View {
let binding = Binding(
getValue: { self.item.isFinished },
setValue: { self.store.dispatch(event: .setItemDone(identifier: self.item.id, isDone: $0)) })
get: { self.item.isFinished },
set: { self.store.dispatch(event: .setItemDone(identifier: self.item.id, isDone: $0)) })
return Toggle(isOn: binding) {
Text(item.title)

View File

@@ -22,7 +22,7 @@ struct TodoListView : View {
VStack {
Spacer()
AddItemView()
.relativeWidth(1.0)
// .relativeWidth(1.0)
.background(Color.white)
.cornerRadius(12.0)
.shadow(radius: 16.0)