In an OSX-application I have a main class A and a second class B. Both run a window each, at the same time.
In class A there is a button that plays a movie in an AVPlayerView (called playerView) [The movie is loaded into the PlayerView earlier!]:
- (IBAction)runMovieN:(id)sender {
[playerView.player play];
}
This works perfectly fine. The movie is played immediately after clicking the button.
On the other hand, in class B there is a button that calls a method in class A...
- (IBAction)runMovie:(id)sender {
ViewController *runMovieButton = [[ViewController alloc] init];
[runMovieButton runMovie];
}
...which will run this method in class A:
- (void)playPause {
NSLog(@"A");
[playerView.player play];
}
The problem is, that the Log will be printed out perfectly fine, but anything else that is in this method will be ignored, no matter what is in there. The content of the bracket is being ignored completely, except for the Log.
The solution is probably very easy, but I just cannot come up with any that could possibly work.