iphonesdk:停止视频
当我离开某个视图时,如何停止视频,并在再次回到原始视图时再次播放视频 以下是在原始视图中播放视频的代码:iphonesdk:停止视频,iphone,xcode,video,ios4,Iphone,Xcode,Video,Ios4,当我离开某个视图时,如何停止视频,并在再次回到原始视图时再次播放视频 以下是在原始视图中播放视频的代码: - (void)viewDidLoad { NSBundle *bundle=[NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Video" ofType:@"mp4"]; NSURL *movieURL=[[NSURL fileURLWithPath:moviePath] r
- (void)viewDidLoad {
NSBundle *bundle=[NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"Video" ofType:@"mp4"];
NSURL *movieURL=[[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
theMovie.view.frame = CGRectMake(104.0, 134.0, 200.0, 250.0);
[self.view addSubview:theMovie.view];
[theMovie play];
[super viewDidLoad];
self.view.backgroundColor = [UIColor viewFlipsideBackgroundColor];
}
-(void)视图中播放将消失:(BOOL)动画
-(void)viewdide出现:(BOOL)动画