how to pass multiple arguments in a single function in Objective-C? I want to pass 2 integer values and the return value is also integer. I want to use the new Objective-C synta
Since this is still google-able and there are better solutions than the accepted answer; there's no need for the hideous withArg2
– just use colons:
Declaration:
@interface
-(void) setValues: (int)v1 : (int)v2;
Definition:
@implementation
-(void) setValues: (int)v1 : (int)v2 {
//do something with v1 and v2
}