Accessing property from another class
I have a class named TLController. It is the main controller for my application. I have another class named TLMoviePlayer. This one specifically controls the movie player portion of the application.
In TLMoviePlayer.h, I have an IB Outlet called player, of type QTMovieView. I have it set as a retained property @property (retain) IBOutlet QTMovieView *player; . In TLController, I have moviePlayer as a TLMoviePlayer. I can get data from TLMoviePlayer, but the player (QTMovieView) always returns null.
- (IBAction)buttonAction:(id)sender
{
[mainView setSubviews:[NSArray arrayWithObjects:mainTableView,videoPlayerView,nil]];
NSError *err = nil;
QTMovie *movie = [QTMovie movieWithFile:[[movies objectAtIndex:[movieTable selectedRow]] valueForKey:@"Location"] error:&err];
moviePlayer = [TLMoviePlayer new];
NSLog(@"before:%@",moviePlayer.player);
[moviePlayer.player setMovie:movie];
NSLog(@"after:%@",moviePlayer.player);
}
Both the before and after return (null). Any idea why I can't access player during this method?