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
@@ -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)
@@ -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)
@@ -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)
@@ -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)