1
我想添加一个自定义播放按钮,但不能把它放在视频前面。这是我的代码。如何创建一个按钮作为MPMoviePlayerController的子视图?
- (IBAction)playMovie:(UIButton *)sender {
NSURL *url = [[NSURL alloc] initWithString:urlStr.text];
self.movie = [[MPMoviePlayerController alloc]initWithContentURL:url];
self.movie.controlStyle = MPMovieControlStyleNone;
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height)];
button.backgroundColor=[UIColor yellowColor];
[button setTitle:@"Normal State Title" forState:UIControlStateNormal];
[movie.view addSubview:button];
self.movie.shouldAutoplay = YES;
[self.view addSubview:self.movie.view];
[self.movie setFullscreen:YES animated:NO];
}
你能指导我如何创建自定义进度条吗? –