Method parameters
suggest changeIf you want to pass in values to a method when it is called, you use parameters:
- (int)addInt:(int)intOne toInt:(int)intTwo {
return intOne + intTwo;
}
The colon (:) separates the parameter from the method name.
The parameter type goes in the parentheses (int).
The parameter name goes after the parameter type.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents