I am playing video in iphone application i want that when done button is clicked player should move back to original view from where it played.
I am using following code
viewDidLoad(){
[self play];
}
-(void)play{
NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"3idiots.mov" ofType:nil];
NSURL *url = [NSURL fileURLWithPath:urlStr];
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
[self.view addSubview:moviePlayer.view];
moviePlayer.view.frame = CGRectMake(0, 0, 1024, 768);
[moviePlayer play];
}