In this chapter, you learned how to create custom NSError
, which is the traditional way of reporting that something went wrong. Every time a function returns NSError
, you should try to solve the problem or report what has happened to the user.
We could also appreciate the new way of trapping errors with try
and catch
a few times. This is a new feature on Swift 2, but it doesn't mean that it will replace NSError
. They will be used in different situations.
During the chapter, you learned the different ways of displaying options or a list of items on the screen. The table view is the most common one and we used it with custom cells. There is also the collection view controller, which works like a table view controller, but it can add cells horizontally and vertically. The other way is to use the page view controller, which is basically a table of view controllers.
The way we retrieved information was by using APIs. This is a very common way as internet connection is common these days....