Tag: do
-
Thrown Errors
There’s many ways to handle errors in Swift. For some errors, using throws is a great way to handle errors without crashing the system. Download the exercise file. You’ll find a project with an embedded playground. While there’s a lot better ways to do this, I’ll use an example of a function coffee(name:) that finds […]
-
Reading and Writing Text and CSV files in Swift
The power behind all computing is data. We collect data, process data, present data and most importantly store data. Without storage, the others are meaningless. In a live app, we can store our data in collection types such as dictionaries and arrays. But that only works when the app is working. When the app closes, […]