I’m trying to send data between two classes. I’ve done it using the properties method, but the data keeps coming back on the other side empty.
FrameGallery.h (class that’s sending data):
@interface FrameGallery{
NSMutableArray *filesArray;
}
@property (nonatomic, retain) NSMutableArray *filesArray;
@end
FrameGallery.m
#import "FrameGallery.h"
@implementation FrameGallery
@synthesize filesArray;
LoadFilePopOverController.m (class that’s receiving data)
FrameGallery *frameGallery = [[FrameGallery alloc] init];
NSLog(@"%@", frameGallery.filesArray);
Is there something that I’m missing here that’s really obvious?
I’ve done it successfully in the past but I can’t find the code where I used it. Any help would be appreciated.
Create an array in your LoadFilePopOverController and make it a property , synthesize it.
Now when you navigate to LoadFilePopOverController from FrameGallery , assign the array to the one that was created in LoadFilePopOverController.
For e.g.
in LoadFilePopOverController.h
in .m
Now in your FrameGallery.m , go to the code where you are performing your navigation,
and set the array like: