raywenderlich.com Page 5
My first class ..................................................................................................................... 48!
Swift and MapKit ............................................................................................................ 56!
Polymorphism ................................................................................................................... 64!
Adding annotations ......................................................................................................... 66!
Sorting an array .............................................................................................................. 68!
Equality and operator overload .................................................................................. 70!
Access Control .................................................................................................................. 74!
Where to go from here? ................................................................................................ 76!
Chapter 4: Generics ........................................................................... 77!
Introducing generics ........................................................................................................ 77!
Generics in action ............................................................................................................ 78!
Ordered dictionaries ...................................................................................................... 79!
Aside: Assertions & preconditions ................................................................................. 87!
Adding image search ..................................................................................................... 90!
Generic functions and protocols ................................................................................... 95!
Where to go from here? ................................................................................................ 99!
Chapter 5: Functions and Closures ................................................. 101!
Functions .......................................................................................................................... 101!
Methods ........................................................................................................................... 116!
Closures ........................................................................................................................... 119!
Where to go from here? .............................................................................................. 129!
Chapter 6: Enums and Switch Statements ..................................... 131!
Basic enumerations ........................................................................................................ 131!
Switch statements ........................................................................................................... 135!
Associated values .......................................................................................................... 137!
Enums as types ............................................................................................................... 140!
Optionals are enums ..................................................................................................... 143!
JSON parsing using enums .......................................................................................... 143!
Where to go from here? .............................................................................................. 148!