Question

While searching for some missing libraries with CR in it's name I started wondering what is the legacy behind the "CR" in https://github.com/croberts22/CRNavigationController or some other frameworks out there?

Does it have to do with Reference Counting? Or is it something else?

Was it helpful?

Solution 2

Yep, it's the class prefix. These are set on a per project basis, and you are prompted to set a class prefix when you start a new project in Xcode.

Here's the official word from Apple on class prefixes:

Your own classes should use three letter prefixes. These might relate to a combination of your company name and your app name, or even a specific component within your app. As an example, if your company were called Whispering Oak, and you were developing a game called Zebra Surprise, you might choose WZS or WOZ as your class prefix.

More can be found on the Programming with Objective-C: Conventions page.

OTHER TIPS

Seeing that the name of the author is Corey Roberts I'd guess that is the reason.

It's a naming convention. In Objective-C we don't have namespaces (like in C++) so to avoid name collisions libraries' authors add their initials as a prefix of classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top