在我的應用程序播放視頻的視圖之一的部分黑色背景,包含下面的代碼iPhone:MPMoviePlayer顯示第二最初
NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"bgVideo" ofType:@"mov"]];
player = [[MPMoviePlayerController alloc] initWithContentURL:url];
[player setControlStyle:MPMovieControlStyleNone];
player.view.frame = CGRectMake(35, 190, 245, 156);
[self.view addSubview:player.view];
[player play];
[player.view setBackgroundColor:[UIColor clearColor]];
我寫了這個代碼在viewWillAppear中方法
但當我開始觀看這個視圖時,我的MPMoviePlayerController會在開始播放視頻之前顯示黑屏,並顯示秒數。
我不想黑屏第二。
我爲此做了什麼?
thanx提前。
相關:http://stackoverflow.com/questions/8429701/mpmovieplayercontroller-showing-black-empty-screen – bummi 2013-10-20 12:36:00