I want to declare a global array so I can use this in all methods and every where in my app. I have two buttons which 1 shows the next image in the array and the other button shows the previous image shown. I want both buttons to use the same array.
NSMutableArray *images = [[NSMutableArray alloc]
initWithObjects:@"Americans.png",
@"Approach.png",
@"Arianny.png",
@"Atoms.png",
@"Australia.png",nil];
You can use dispatch_once to allocate a static object:
Generally you would wrap this in a function or a class method of a utility class.