struct ContentView: View {
   @State private var appData = ApplicationData.shared

   init() {
      appData.titleInput = appData.title
   }
   var body: some View {
      VStack(spacing: 8) {
         Text(appData.title)
            .padding(10)
         TextField("Insert Title", text: $appData.titleInput)
            .textFieldStyle(.roundedBorder)
         Button(action: {
            appData.title = appData.titleInput
            appData.titleInput = ""
         }, label: { Text("Save") })
         Spacer()
      }.padding()
   }
}