Don't understand multiple parameter declarations in objective-c
- by Blankman
can someone clarify this for me:
When there’s more than one argument, the arguments are declared within the method name after the colons.
Arguments break the name apart in the declaration, just as in a message. For example:
- (void)setWidth:(float)width height:(float)height;
So in the above:
method is for instance variables
returns void
parameter#1 is a float, named width.
parameter#2 is a float,named height.
But why is it hieght:(float)height; and not just:
- (void)setWidth: (float)width (float)height;