Comments (9)
thank you
from zfplayer.
我现在就是和didselet冲突了。我的操作是push到新的页面。有无解决办法?
from zfplayer.
上面两个comment你看了没?
from zfplayer.
确实是有这个问题,替代方案:
//UITableViewCell.m
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
NSLog(@"touch.view:%@",touch.view);
if ([touch.view isDescendantOfView:self.playerView]) {
self.touchedInPlayer = YES;
self.selectionStyle = UITableViewCellSelectionStyleNone;
return YES;
}
self.selectionStyle = UITableViewCellSelectionStyleDefault;
self.touchedInPlayer = NO;
return NO;
}
//UITableView
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
if (cell.touchedInPlayer) return;
// bla bla bla...
}
from zfplayer.
这是我的理解,可能有不对的地方:在playerView.m的createGesture方法里作者添加了单击和双击两个手势,并且使用了方法requireGestureRecognizerToFail,让单击手势在双击手势识别失败后才识别。这样的话当用户单击了cellPlayerView,手势识别器先捕捉到touch,然后发送hit-textview,两者各自做出响应,在单击识别器还在识别该touch时(在等待双击识别器识别),此touch已经传递到了cell上去了,cell识别了它,响应了didSelectRowAtIndexPath。如果将requireGestureRecognizerToFail去除,touch会立刻被单击识别器识别,触发单击事件,cell不会识别该touch, 但是当用户双击cellPlayerView时,则会同时响应单击双击事件,这是一个处理方式。第二个处理方式,增加一句代码tap. delaysTouchesBegan = true,这样的话,在单击识别器识别到一个touch时,并不会传递给hit-testView,cell没有touch到达,cell不会响应didSelectRowAtIndexPath,单双击手势也不会被同时识别,但是单击事件的识别会慢0.15ms。我选择第二个处理方式。参考:http://www.jianshu.com/p/2e074db792ba,http://www.codes51.com/article/detail_308743.html
from zfplayer.
@lihanst @renzifeng 我是说作者不修改代码解决这个问题么? 如果我改了代码,将来怎么再更新呀
from zfplayer.
我前些天就修复了这个bug啦
from zfplayer.
@renzifeng 我刚刚参考 @zhengwu119 的修改成功。不过我要改多处,现在才改好一处。看来我要回滚了。那你为何不关掉bug呀。
顺便问下,滑动cell然后视频收缩右下角有没有bool控制关掉这种特性。目前我们只想滑出屏幕关掉视频。
from zfplayer.
@renzifeng 现在我更新到最新的pods 版 1.1.7 问题并没有解决。 然后下载了demo安装pod之后发现各种报错。根本运行不起来。
from zfplayer.
Related Issues (20)
- 使用过程中出现,设置静音播放,开始播放的瞬间有声音然后立马静音了问题 HOT 3
- 竖屏全屏的时候,在灵动岛上返回按钮被遮住
- ios 目前发现 ios 15.6.1 横屏黑屏,ios 16. ios 17 没有此问题
- pod 4.14版本,发现少了ZFAVPlayerManager 类,有遇到的吗
- 在启用长按手势操作时无法禁用滑动手势 HOT 1
- player在scrollview中,stopWhileNotVisible=false之后的addPlayerViewToSmallFloatView能否有外界控制?
- Framework Issue
- 全屏之后,点击返回,页面会闪一下退出全屏,最新demo也是这样 HOT 3
- 4.1.4版本 点击或左滑返回上级页面后 依然在播放声音
- 多个视频在列表里视频播放的issue
- ZFFullScreenViewController全屏播放在设备iPhone 11 Pro Max 15.3系统上。退出全屏播放返回后,tabbar高度出错。 HOT 1
- Mac mini M2 芯片 demo 无法运行
- 苹果新政策三方要求提供隐私清单PrivacyManifest,麻烦作者支持一下
- 苹果隐私清单是否需要支持,Does the Apple Privacy List(PrivacyInfo.xcprivacy) need support HOT 3
- 边下边播、秒播 KTVHTTPCache ,遇到一个问题 HOT 3
- 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
- 怎么用啊
- APP 退到后台 再放回来 在暂停的请况下 会继续播放
- iphonex判断问题
- iOS18播放相册视频失败 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zfplayer.