December 2018
Intermediate to advanced
414 pages
10h 19m
English
When you write Swift class names, we follow the recommendation of not prefixing our class names or extensions with a two or three letter code. However, back in Objective-C, those conventions are quite important for a number of reasons, but principally to avoid naming collisions with other objects from different frameworks.
Let's consider the following code snippet that defines a movie:
class Movie { let title: String let director: String let year: Int /* Initializers */}
As it is right now, it is not possible to use it in Objective-C as the Movie object doesn't inherit NSObject. Also, because you're exposing your class to Objective-C and not following the naming conventions of Objective-C with the prefix, ...
Read now
Unlock full access