I am currently using a property in the AppDelegate class.
Now that my needs are being spent, I need more than one of these global properties, so I decided to create a Singleton class that will hold properties and interfere with them. I found a lot of information about Singletons, but I could not figure out if it is possible to change a property without an instance of the class?
For instance:
@interface Tools : NSObject
@property (nonatomic,retain) NSDictionary* item;
...
@end
I'd like to do:
[Tools setItem:someDict]
someClass = [someClass alloc] initWithItem:[Tools getItem]];
All my ideas ended up with the Tools class not having an instance. I tried to set the element as a static variable (not a property) that worked, but I'm sure this is not correct, why do this.
a related but different question, addition:
#import "Tools.h"
In the project-Prefix.pch file, so that the properties of the element will be available everywhere, in the project, is this a good idea?