- denotes an instance method, whereas if it were + , it would be a class method.
(id) is that the method will return, which is just a reference to the object.
The rest of the line shows the options. When you call the function, you write a part of each parameter before : for example [class initWithTitle:@"my title"];
The reason there are two names for each parameter is because the method itself will refer to the variable after it : so the title will be newTitle .
At first it was confusing, but there are advantages.
In addition, the parts of each parameter in brackets are a type of parameter object. (NSString *) is a pointer to an NSString . If you need to pass something that was not an NSObject , like NSIntger , you wonβt need * . You simply do: -(id)initWithInteger:(NSIntger)newInteger;
mjdth source share