How to write a method/message with multiple parameters?
问题 How do you write a method/message with multiple parameters? EDIT: Like multiple parameters for a single method/message, I mean. 回答1: You can write the declaration as such: - (void) drawRoundedRect:(NSRect)aRect inView:(NSView *)aView withColor:(NSColor *)color fill:(BOOL)fill The subsequent call (with 4 parameters) could look like: [self drawRoundedRect:rect inView:self withColor:[NSColor greenColor] fill:YES]; where rect is a previously defined NSRect, self is the NSView the method is called