So far, the app works very well, presenting all the Todo tasks, but we need to allow the user to create their own Todo task.
As the specifications require that a Todo task is editable, it makes sense to use the same View Controller either to create a new Todo task, or to edit an already existing Todo task.
To implement the desired layout, we are going to use a TableViewController
class again using static cells so that we can configure and lay it out directly in Interface Builder.
Add another TableViewController
class close to TodoTableViewController
, and after selecting the Table View inside, set the content as Static Cells instead of Dynamic Cells.
Then, select the first and only section, that is, Table View Section.
Now set the number of Rows to 5.
Before implementing the cells, select Table View and set the height of each cell to 50.
The first row must contain the description of Todo, so we use UITextField
to handle this.
Select the UITextField
component...