In my app i use
[theMutableArray addObject:theString];
several times and it works every time, however when trying to add in another view it won't add.
I know my string is not null because i have
NSLog(@"%@, %@", theString, theMutableArray);
and it returns "the string value", (null)
In my viewDidLoad i have
theMutableArray = [[NSMutableArray alloc] init];
and where i try to add it I have
theString = [alertView textFieldAtIndex:0].text;
[theMutableArray addObject:theString];
NSLog(@"%@, %@", theString, theMutableArray);
Is there a typo of any sort? or did i forget something?
@propertyso that your class has a reference to it and you can access beyond the method where you initialized it.self.theMutableArray?