I teach myself Objective-C from a book (Cocoa for Mac OS X), and I'm halfway there, but I have two questions that are not answered or not defined in the book.
The way I see it at the moment is that the methods -require the class to be assigned and initialized first, however +it can be called statically without requiring allocation and initialization. For example. (in function in another class)
Earth *world = [[Earth alloc] init];
int population = [world population];
int population = [Earth population];
If this is correct, when should static methods be used, and do they have any disadvantages?
var paramater var *, , var ? ( .)
- (void) setPopulation: (NSNumber *) ;// *, NSNumber
- (void) setPopulation: (int) ;// , *
, - Objective-C, .. PHP Ruby.