Hey Guys
Im driving myself nuts here i have the movie playing with full screen controls but i cannot get the done button to respond and return back to the parent view here is the code
PHP Code:
MPMoviePlayerController* theMovie=[[MPMoviePlayerController alloc] initWithContentURL:[NSURL URLWithString:escapedUrl]];
[self.view addSubview:theMovie.view];
theMovie.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
theMovie.controlStyle=MPMovieControlStyleFullscreen;
//Register for the playback finished notification.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(myMovieFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:theMovie];
/*
if ([theMovie respondsToSelector:@selector(setControlStyle:)]) {
theMovie.controlStyle = MPMovieControlStyleNone;
} else {
theMovie.movieControlMode = MPMovieControlModeHidden;
}
*/
[theMovie play];
NSLog(@"Should be playing");
Here is the callback
PHP Code:
-(void)myMovieFinishedCallback:(NSNotification*)aNotification
{
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
MPMoviePlayerController* theMovie=[aNotification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:theMovie];
[theMovie release];
[activityIndicator stopAnimating];
}
Do you see anything wrong with this?
Thanks
Ricky