I am making a gallery using the Three20, my problem is when I try to create my view to show the gallery my AlbumController isn't populated with the photos get from my previous view. The Photos are there in a NSArray (inputAlbumController) and my title for the next view is in the NSTextField (txtSearch), the application enters the if-statement (self.albumView == nil), I tested them out with NSLog, but when I try to transfer them via the setters on the next view I get nothing. Here is some of the code needed for this problem:
This is the rootViewController.h:
@interface rootViewController : UIViewController {
AlbumController *albumView;
IBOutlet UITextField *txtSearch;
}
@property (nonatomic, retain) AlbumController *albumView;
This is in the function from my rootViewController.m:
geoFlickrAppDelegate *appDelegate = (geoFlickrAppDelegate *)[[UIApplication sharedApplication] delegate];
if(self.albumView == nil) {
[albumView setMyImages:inputAlbumController];
[albumView setMyTitle:txtSearch.text];
//self.albumView = album;
[appDelegate toGallery];
}
[self.navigationController pushViewController:self.albumView animated:YES];
This is my AlbumController.h:
@interface AlbumController : TTThumbsViewController {
NSArray *myImages;
NSString *myTitle;
}
@property (nonatomic, retain) NSArray *myImages;
@property (nonatomic, retain) NSString *myTitle;
This is the ViewDidLoad from my AlbumController.m:
- (void)viewDidLoad {
self.photoSource = [[PhotoSource alloc]
initWithType:PhotoSourceNormal
title:myTitle
photos:myImages
photos2:nil
];
}
Any idea why is this so? Am I missing something?