Objective-C comfortable manners

I spent some time with Objective-C, and for some (especially experienced) programmers I see something like religious. I like it and I would like to find good manners. Can you tell me where I can find these sacred rules?

For example, I confuse naming constants or keys. Should it be kName or nameKey or nameKey ?

Or...

I noticed that some ivars are declared using _ or __... I want to make clean code. Thanks!

+4
source share
3 answers

The Cocoa Coding Guide in the Apple Mac OS X Reference Library is a good place to start.

+2
source

Consistency is the best rule you can apply.

Choose a style that you like and stick to it, or if you are working on an existing codebase, it’s good practice to adopt rules that have already been applied.

0
source

Source: https://habr.com/ru/post/1340215/


All Articles