Coder Social home page Coder Social logo

Comments (9)

renzifeng avatar renzifeng commented on August 26, 2024 1

thank you

from zfplayer.

ctwlilei avatar ctwlilei commented on August 26, 2024 1

我现在就是和didselet冲突了。我的操作是push到新的页面。有无解决办法?

from zfplayer.

lihanst avatar lihanst commented on August 26, 2024 1

上面两个comment你看了没?

from zfplayer.

zhengwu119 avatar zhengwu119 commented on August 26, 2024

确实是有这个问题,替代方案:

//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.

lihanst avatar lihanst commented on August 26, 2024

这是我的理解,可能有不对的地方:在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.

ctwlilei avatar ctwlilei commented on August 26, 2024

@lihanst @renzifeng 我是说作者不修改代码解决这个问题么? 如果我改了代码,将来怎么再更新呀

from zfplayer.

renzifeng avatar renzifeng commented on August 26, 2024

我前些天就修复了这个bug啦

from zfplayer.

ctwlilei avatar ctwlilei commented on August 26, 2024

@renzifeng 我刚刚参考 @zhengwu119 的修改成功。不过我要改多处,现在才改好一处。看来我要回滚了。那你为何不关掉bug呀。
顺便问下,滑动cell然后视频收缩右下角有没有bool控制关掉这种特性。目前我们只想滑出屏幕关掉视频。

from zfplayer.

ctwlilei avatar ctwlilei commented on August 26, 2024

@renzifeng 现在我更新到最新的pods 版 1.1.7 问题并没有解决。 然后下载了demo安装pod之后发现各种报错。根本运行不起来。
image
image

from zfplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.