以官方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];
}
}
}
}
};