I want to keep the value of a variable in my multiple class instances... Here is what I am doing: 1. Declaring a class level variable. 2. Setting it in inside one of my function during first initialization 3. Trying to fetch this during next object creation.
Here, I am not able to retain the value. Any clue?
I have this variable defined in my .h file:
@property (nonatomic, retain) NSString *mainServiceType;
and then I am setting it in my method in .m file
self.mainServiceType = [aSelectedObject objectForKey:kISTRemoteFormsLocalizationNameKey];
and inside another method I am using it. But the issue is that, this is available to me during Object1 lifecycle who created it but not on Object2 lifecycle. How does static work in Objective C.