I have two classes. First one downloads data images and adds them to array one after another. When it's done with all 16 of them runs action to switch view to the second one. My problem here is how to access the array from first class in second class?
Here is the code:
first.h
@interface first{
NSMutableArray *imagesArray;
}
@property(nonatomic,retain)NSMutableArray *imagesArray;
(array is synthetized in .m file)
second.h
#import"second";
#import"first.h"
second.m
-(void) viewdidload {
first *another = [[another alloc] init];
label.text = [NSString stringWithFromat:@"%i",[another.imagesArray count]];
imageView.image = [another.imagesArray objectAtIndex:0];
}
label
shows 0 and imageView
shows nothing. Any ideas?