0
此代碼未設置iOS6中MPMoviePlayerController
的背景視圖,但在iOS7中完美工作。mpmovieplayer未在ios6中設置背景
UIView *patternView = [[UIView alloc] initWithFrame:self.view.bounds];
patternView.backgroundColor = [UIColor redColor];
UIImageView *imgView=[[UIImageView alloc]initWithFrame:self.view.bounds];
imgView.image=imgBackGround;
[patternView addSubview:imgView];
[self.moviePlayer.backgroundView addSubview:patternView];
什麼是替代方案?
還有一個imageView,它是最重要的。任何想法? –
你可以添加圖像使用下面的行[self.moviePlayer.view setBackgroundColor:[UIColor colorWithPatternImage:@「your image」]]; –
是的,你可以使用上面的方法...但colorWithPatterImage方法會消耗內存...所以請檢查它! –