Reputation: 3820
I want to add action on the all button who shows bellow picture . I add this view through .. following code --
AVPlayerViewController *playerViewController = [[AVPlayerViewController alloc] init];
playerViewController.view.frame = CGRectMake(10,10, _bgView.frame.size.width-20, _bgView.frame.size.height-20);
playerViewController.player = [AVPlayer playerWithURL:url1];
[_bgView addSubview:playerViewController.view];
_bgView.autoresizesSubviews = TRUE;
So please help me for add the action on this buttons
Upvotes: 3
Views: 1296
Reputation: 3820
Yes..... I resolve that issues... the right code is--
_playerViewController = [[AVPlayerViewController alloc] init];
_playerViewController.view.frame=CGRectMake(10,10, _bgView.frame.size.width-20, _bgView.frame.size.height-20);
_playerViewController.player = [AVPlayer playerWithURL:url1];
Upvotes: 3