O'Reilly logo

Swift for Beginners: Develop and Design, Second Edition by Boisy G. Pitre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Organizing with Classes and Structures

Swift is an object-oriented language, and as such, it is apropos to devote considerable real estate to the subject. If you are familiar with other object-oriented languages, such as Objective-C and C++, the concepts presented here will be very familiar to you. If you are new to the idea of object-oriented programming (OOP), don’t be alarmed. I’ll take you through a tour of the concepts to prepare you for Swift’s flavor of OOP.

No matter what your current familiarity is with OOP concepts, preparing yourself with a new playground file in Xcode 7 is a good idea. Choose File > New > Playground, and save your new playground file as Chapter 5.playground. You’ll use this playground for all the examples ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required