You may also find yourself in a situation where the generated names for your classes or methods are suboptimal. Thankfully, Clang provides macros that help us rename classes, methods, and more.
Naming, renaming, and refining Objective-C for Swift
Setting Objective-C names from Swift
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...