Xentarios
Jul 23, 2008, 05:31 PM
I have an array in my NameAppDelegate class that I would like to access from somewhere else. What is the correct syntax to access it? I currently have the following in my viewController class and the arrayName array is set up properly in the NameAppDelegate class.
NameAppDelegate *appDelegate = (NameAppDelegate *)[[UIApplication sharedApplication] delegate];
NSLog([appDelegate.arrayName objectAtIndex:0]);
Checking the console I don't see any value printed yet I can test a different array from the same file and it prints correctly.
NameAppDelegate *appDelegate = (NameAppDelegate *)[[UIApplication sharedApplication] delegate];
NSLog([appDelegate.arrayName objectAtIndex:0]);
Checking the console I don't see any value printed yet I can test a different array from the same file and it prints correctly.
