Chapter 2.  Structures, Classes, and Instances

In this chapter, you will learn the differences between structures and classes. We will start working with examples on how to code classes and customize the initialization and deinitialization of instances. We will understand how classes work as blueprints to generate instances and dive deep into all the details of Automatic Reference Counting (ARC).

Understanding structures, classes, and instances

In the previous chapter, you learned some of the basics of the object-oriented paradigm, including classes and objects, which are also known as instances. We started working on an app required by an acrylic paint manufacturer who wanted to take full advantage of the popularity of an admired YouTuber, painter, ...

Get Swift 3 ObjectOriented Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.