Hi All I have an array arryImages which I would only like to declare once and access it from a number of view controllers, but I can't figure out where to place it.
I have a separate class (Variables.m) which contains the following code
@implementation Variables
//images array
arryImages = [NSArray arrayWithObjects:
[UIImage imageNamed: @"ico-company.png"],
[UIImage imageNamed: @"ico-value.png"],
[UIImage imageNamed: @"ico-date.png"],
[UIImage imageNamed: @"ico-notes.png"], nil];
@end
In my viewcontroller class (which I want to access the array) I have added:
#import "Variables.h"
I tried playing with @synthesize, but I can't access the array arrayImages.
(Using the call imageView2.image = [arryImages objectAtIndex:[indexPath row]];) Ps. this works perfect when its just above the code, but not in a separate class.
What am I missing?
Regards