+7  A: 

A minus signifies an object instance method, a plus signifies a class method - known in other languages as a 'static method'.

More info on method types can be found in this wikipedia article.

teabot
Ok, so if I understand this correctly, I would create a new instance of the array object and use the minus sign?When would I find myself using the plus sign with an array then. Surely I always have to create an instance of an array to use one?
JonB
Using NSArray as an example, you might call the class method [NSArray arrayWithObject:] to create an instance of NSArray containing the object you pass in.
teabot
As i understand it, those are for the function definitions. if one is defined with a plus then you call it through the class. Otherwise, you call it through an instance.
RCIX
an example may be the best way to clarify this: [NSMutableArray arrayWithCapacity:10] and [[[NSMutableArray alloc] initWithCapacity:10] autorelease] are equivalent, one is "+ arrayWithCapacity:" the other is "-initWithCapacity:"
cobbal
Just to clarify, I understand what a static method is. I just can't see why there would need to be one for an Array, when surely every-time you have to create an instance of an Array to use one?
JonB
Ah, so it allows you to create an array without having to make the instance first. You still get given an array object at the end of it. Makes sense.
JonB
Thanks for your help all.
JonB
@JonB: Exactly, it's actually a factory method. Note however that those factory methods return autoreleased instances, whereas instances created viaalloc/init have to be released manually. This is a common (and hard to debug) memory management mistake.
Daniel Rinser
@Daniel is correct that +arrayWith... methods are factory methods (in Objective-C we generally call static methods with this functionality "convenience constructors"), but of course not all static methods are or must be. For example, NSURLProtocol is an abstract class with a number of static utility methods.
Quinn Taylor