O'Reilly logo

Swift 2 By Example by Giordano Scalzo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a Todo task

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.

The add a Todo view

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required