When I attempt to enter a new task site, the text field is selected but nothing I type echoes or is accepted
and the display on the canvas does not show a keyboard.
Also if I look at the Simulator display, the Add Task button and input text field do not appear.
Code from ContentView.swift
import SwiftUI
struct ContentView: View {
let taskStore: TaskStore
@State private var newTaskTitle = ""
private var newTaskView: some View {
//Text("Placeholder for new task controls")
HStack {
TextField("Something to do", text: $newTaskTitle )
Button("Add Task") {
//#warning("The task title is hard coded")
let task = Task(title: newTaskTitle)
taskStore.add(task)
}//.disabled(newTaskTitle.isEmpty)
}.padding()
}
var body: some View {
//Text("Hello, SwiftUI")
// .padding()
VStack {
newTaskView
TaskListView(taskStore: taskStore)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView(taskStore: .sample)
}
}