Retaining the value in multiple object creation
<p>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.</p>

<p>Here, I am not able to retain the value. Any clue?</p>

<p>I have this variable defined in my .h file:</p>

<pre><code>@property (nonatomic, retain) NSString *mainServiceType; 
</code></pre>

<p>and then I am setting it in my method in .m file </p>

<pre><code>self.mainServiceType = [aSelectedObject objectForKey:kISTRemoteFormsLocalizationNameKey];
</code></pre>

<p>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.</p>
