Access control is a feature of programming languages that restricts access to code based on where it’s defined. You can apply access control to the following items:
Some limited support for access control is available for:
Most of the time, you won’t have to specify the access level. Swift provides a default access level that works in most cases.
Modules and Source Files
First, we are going to introduce a few terms, because to some extent the access control you get depends on how the code is structured. Access control applies at the module and source file level.
A source file in Swift is a single ...