October 2017
Intermediate to advanced
210 pages
5h 32m
English
Access controls allow us to restrict the access to, and visibility of, parts of our code. This allows us to hide implementation details and only expose the interfaces we want the external code to access. We can assign specific access levels to both classes and structures. We can also assign specific access levels to properties, methods, and initializers that belong to our classes and structures.
In Swift, there are five access levels:
Read now
Unlock full access