Methods
suggest changeSyntax
\-or\+: The type of method. Instance or class?- (): Where the return type goes. Use void if you don’t want to return anything!
- Next is the name of the method. Use camelCase, and make the name easy to remember and understand.
- If the method needs parameters, the first one comes right after the method name, like
:(type)parameterName. Each later parameter isparameterLabel:(type)parameterName. - What does your method do? Put it all here, in the curly braces {}!
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents