WHAT'S IN THIS CHAPTER?
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
This chapter covers the object-oriented programming features of the Swift language. Although Swift draws inspiration from a variety of programming languages and programming paradigms, it is, first and foremost, an object-oriented language. Writing programs in Swift requires a thorough understanding of object-oriented programming, and in particular, the object-oriented features available to Swift programmers. After reading this chapter, you should have the knowledge necessary to understand and write code that makes use of Swift's classes, structs, and enumerations.
Many of the examples given in this chapter are found in the Playgrounds.zip file available from the download section of this chapter. Feel free to load those playgrounds into Xcode and experiment on your own as you read the chapter.
Like most object-oriented languages, including Objective-C, Swift supports two basic object-oriented data structures: classes and structs. ...