美文网首页
ZFPlayer 抖音样式(Douyin style) 播放闪烁

ZFPlayer 抖音样式(Douyin style) 播放闪烁

作者: ai_yo | 来源:发表于2020-06-30 10:55 被阅读0次

    以官方demo为例

    首先把ZFDouYinControlView.m文件下coverImageView effectView bgImgView 的初始化注视掉

    然后在ZFDouyinCollectionViewController  的viewDidLoad 里面加入

    self.player.zf_playerShouldPlayInScrollView = ^(NSIndexPath * _Nonnull indexPath) {

            NSLog(@"%@",indexPath);

            @strongify(self)

            ZFDouyinCollectionViewCell *cell = (ZFDouyinCollectionViewCell*)[self.collectionView cellForItemAtIndexPath:indexPath];

            for(UIView*firstViewincell.subviews) {

                for(UIView*lastViewinfirstView.subviews) {

                    if(lastView.tag==kPlayerViewTag) {

                        for(UIView*playerPresentViewinlastView.subviews) {

                            playerPresentView.backgroundColor= [UIColorclearColor];

                        }

                    }

                }

            }

        };

    相关文章

      网友评论

          本文标题:ZFPlayer 抖音样式(Douyin style) 播放闪烁

          本文链接:https://www.haomeiwen.com/subject/zmitqktx.html