Tag: Swift Optional Values
-
A Swift Tutorial for Working with Classes Part 3: Abstract classes.
In the first tutorial in this series we introduced classes. In the second we did some more advanced manipulations of classes. In both, we discussed the idea of inheritance, which has one final possibility: a class whose only purpose is to define other classes. This is known as an abstract class. Abstract classes are mere…
-
The Swift Swift Tutorial: Ten Points for Using Optionals.
In the first month and a half of using Swift, I could argue the optional value is the most difficult new concept. It isn’t hard, just something different to wrap one’s head around. That Apple’s documentation peppers information about optionals in two different e-books without consolidating the information doesn’t help. I decided to combine what…
-
The Swift Swift Tutorial: Using Dictionaries and Optional Types
[Updated for Swift 2.0/iOS9 9/10/2015 – SJL ] In our last lesson, The PizzaDemo App so far told us some information about pizza sizes. What would be nice is for it to tell us the price for a pizza, based on the area of the pizza. We can learn about Swift dictionaries that way. For…