I am getting an empty var value when accessing to it. That var was properly overwrite.
“name1” is declared at .h like:
NSString *nomTab1;
@property (strong, nonatomic) NSString *nomTab1;
in .m:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
NSArray *viewControllers = [NSArray alloc];
nomTab1 = [NSString alloc];
also is synthezided and set properly during function execution. However, when I try to acces to it from another function (same controller), has an empty value. Seems to be a basic issue but not working… Thank you.
You aren’t retaining nomTab1. You say you have synthesized it, but you aren’t then using
self.nomTab1 = ...so the value isn’t being retained.Check out this for an explanation of synthesize and properites.