'Can I provide a joining argument for the first argument of an objective c function?
- (void)testThisFunction:joiningArgument1(id)argument1 {
NSLog(@"%@", @"Hello: ");
}
This tutorial talks about how there are "joining arguments" which are exposed at the call site. However, when I try to create a joining argument for the first argument, then I get Expected method body error likely because it breaks the syntax.
Can I give the first argument a "joining argument" or is that not allowed? If it is allowed, what is the syntax?
Solution 1:[1]
In objective c you can't define a label for first Argument or parameter the convention for this is like:
- (void)testThisFunctionWithJoiningArgument1:(id)argument1 {
NSLog(@"%@", @"Hello: ");
}
- (void)methodNameWithFirstParam:(id)firstParam secondPraram:(id)secondParam {
NSLog(@"%@", @"Hello: ");
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Maziar Saadatfar |
