Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,拖动时,FMGVideoPlayView 不跟随滑动,一直在固定位置,是什么原因呢?? #2

Open
tanglimei opened this issue May 16, 2016 · 0 comments

Comments

@tanglimei
Copy link

tanglimei commented May 16, 2016

  • (void)playButtonAction:(UIButton *)sender{
    _fmVideoPlayer.index = sender.tag - 100;

    FriendInfoResultModel * tempResultModel = [FriendInfoResultModel mj_objectWithKeyValues:self.dataArr[_fmVideoPlayer.index]];
    VideosModel * model = [VideosModel mj_objectWithKeyValues:[tempResultModel.videos firstObject]];
    [_fmVideoPlayer setUrlString:model.path];
    //_fmVideoPlayer.frame = CGRectMake(0, 275*(sender.tag - 100) + kScreenWidth/5 + 50 , kScreenWidth, (self.view.frame.size.width-20)/2);

    MovieTableViewCell * cell = [self.mainTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:_fmVideoPlayer.index]];
    CGRect cellRect = [cell convertRect:cell.videoPlayer.frame toView:self.view.window];

    _fmVideoPlayer.frame = cellRect;
    [self.view addSubview:_fmVideoPlayer];
    _fmVideoPlayer.contrainerViewController = self;
    [_fmVideoPlayer.player play];
    [_fmVideoPlayer showToolView:YES];
    _fmVideoPlayer.playOrPauseBtn.selected = YES;
    _fmVideoPlayer.danmakuView.hidden = YES;
    _fmVideoPlayer.hidden = NO;
    }

这样添加后,视频View一直在固定位置。

哦,原来必须是UITableViewController

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant