0
我想添加一個MPMoviePlayerController到UIView。MPMoviePlayerController不在UIView
我這樣做,但它出現在我的視圖的頂部,而不是UIView在我的故事板中的位置。
moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url];
moviePlayer.controlStyle = MPMovieControlStyleNone;
moviePlayer.view.frame = videoView.bounds;
moviePlayer.scalingMode = MPMovieScalingModeFill;
moviePlayer.scalingMode = UIViewContentModeScaleAspectFit;
moviePlayer.repeatMode = MPMovieRepeatModeOne;
[self.view addSubview:moviePlayer.view];
任何想法?
什麼是videoView?什麼是self.view?你將它設置爲videoView.bounds,所以x,y原點在o,o。 – user523234 2014-09-01 02:10:27