Abstract
As alluded to in Chapter 2, Swift takes an innovative and broad-based approach to access control. This is especially evident when compared with Objective-C, where true access control is limited to instance variables—of which usage has been discouraged in favor of properties for several years. This chapter will provide an example of how circumventing intentional access control can be achieved, followed by an in-depth explanation of access control in Swift, aided by examples to help demonstrate each use case.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Scott Gardner
About this chapter
Cite this chapter
Gardner, S. (2014). Controlling Access. In: Transitioning to Swift. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0406-1_10
Download citation
DOI: https://doi.org/10.1007/978-1-4842-0406-1_10
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-0407-8
Online ISBN: 978-1-4842-0406-1
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)