As you have already seen in this chapter, Swift has a mechanism for controlling access to a class, method, or property – among other things. This is done via access modifiers, keywords which are applied to the entities whose visibility is being configured.
In Swift, there are three levels of visibility and three corresponding keywords by which the visibilities are specified:
A class, method, or other entity which has
can be seen from all files inside the same module
as the class.
An entity with
internal visibility cannot, however,
be seen from files in a different module.
internal is the default level of visibility for an entity. When you first add a ...