O'Reilly logo

Swift Translation Guide for Objective-C Users: Develop and Design by Maurice Kelly

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 10. Structures and Enumerations

Look out classes, you’re no longer the only object type in town. Swift has given both structures and enumerations the power to associate functions with the data they act upon. This transforms structures and enumerations from being simple data types, to being complex object types, causing the lines dividing them to become increasingly blurred. This chapter picks up where the last chapter on classes left off and aims to help distinguish between the three types. By explaining the subtle differences between them, we hope to make it easier to decide precisely which type you need.

Structures

In the hierarchy of the three object types in Swift, structures are most certainly in the middle with respect to capability. ...

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