To Do App – Code Kit Documentation

Hey there! This project contains the source code of the ToDo app. Feel free to use the code as a template for your own project, or to modify the source files as a way to experiment and further your learning.

Reading code written by other people is also one of the most important skills to learn as a developer. I hope that by reading this code, you improve your own understanding of Swift and SwiftUI.

This documentation contains a simple yet detailed explaination of the project, but should you have any questions regarding the code and stuff, please feel free to post it up on our forums.

Getting Started

To get started, open the .xcodeproj file in Xcode, and run the project (Cmd+R) in Simulator. This will allow you to experience the app first hand.

The app’s starting point is the app file, which should be dotoApp.swift. Most of the source code includes inline documentation to serve as your guide reading the code.

Scenes

Scenes are views that take up the entire screen, to show a specific content. In this code kit, all of the scenes can be found in the Scene group, and there are 4 initial scenes included in this kit.

The scenes included are:

  1. TaskTabView – The scene that is shown when launching the app. This scene hosts the bottom tab bar, and has an initial of two tabs: the tab which shows all tasks grouped in three sections (inbox, daily, monthly), and the second tab dedicated only for inbox tasks.
  2. TaskView – holds the List that shows all tasks, and is the first tab of TaskTabView.
  3. InboxView – holds the List that shows inbox only items. All newly created Task are added into the Inbox.
  4. ToDoFormView – serves as the input form when creating a new task, or the detail view when viewing an existing one from the TaskView or the InboxView.

More information about the scene are described in better detail as inline documentation comments in their respective SwiftUI files. Open the scene file in Xcode to learn more.

Getting Help

Should you have any questions about this code kit, feel free to post it up on our forums.

Copyright © 2022 CodeWithChris. All rights reserved.