I'm new to Objective-C and I'm finding the syntax of valid Objective-C code hard to understand. For example, all objects are normally allocated and initialized using the MyClass *myObject = [[MyClass alloc] init]; syntax. However, in the example below, a method is called on the "NSKeyedArchiver" class before creating an initialized object of that class. The same situation happens in the next line of code, where a method is called on "NSUserDefaults" without creating an allocated/initialized object. How is this possible?
NSData *bandObjectData = [NSKeyedArchiver archivedDataWithRootObject:self.bandObject];
[[NSUserDefaults standardUserDefaults] setObject:bandObjectData forKey:bandObjectKey];
Thanks!