Most objective-c you will find tend to use singletons that wrap objects created with composition. So that the class that you access is a really light allocation (really just some pointers), and you can use the objects inside of it like any other class. You also give yourself the freedom to make multiple instances if needed:
[[MyGameAssets sharedInstance] getMedia];
I find this kind of approach very good when working with stuff like levels where as your game grows you may find yourself all of a sudden needing to load/unload in multiple sprite sheets and sounds. So media changes, but you still have a global access point to it.
An example of creating a singleton is very simple in objective-c:
static MyGameAssets *instance = NULL;
+ (MyGameAssets*)sharedInstance{
@synchronized(self){
if (instance == NULL){
instance = [[self alloc] init];
}
}
return(instance);
}
Then write the class like as normal from there.
Anytime you want a reference to this class you just reference sharedInstance. So instead of:
MyGameAssets *ga = [[MyGameAssets alloc] init];
You use:
MyGameAssets *ga = [MyGameAssets sharedInstance];
The static approach is very valid, but I just wanted to post an alternative in case people see this post in a search later.