I want to create a special class for holding a lot of values like strName, strNo, intPassword...So that several other classes can modify the same value in this class. I want to use the dot syntax to call its properties like
Values.strName = ...;
I don't want to initialize the class everytime before I read/write its values because some of its values are still in use.
I call the class 'Values' and design it using the following code:
@interface Values : NSObject {
IBOutlet NSString *strName;
}
@property (nonatomic, copy) NSString *strName;
@end
I import "Values.h" to another class and call the property using
Values.strName = @"Name";
I don't create an object of 'Values' to avoid the data be overwritten. An error pops up saying that 'syntax error before . token'. Any other ways to create a class storing global variables but needn't be initialized when using these data?