Code Monkey home page Code Monkey logo

Comments (6)

xy853535182 avatar xy853535182 commented on September 28, 2024

看了一下源码,弹幕文字的动画是通过注册CADisplayLink 指定update方法不停的改变的x和y坐标实现动画的,但是UITextField键盘事件的优先级比CADisplayLink事件高,runloop被添加进来了一个高优先级的任务,CADisplayLink下一次的调用就会被暂停转而先去执行高优先级的任务,然后在接着执行CADisplayLink的调用,从而造成动画过程的卡顿,使动画不流畅。作者能帮忙解决一下这个问题吗,建议动画能改成用CABasicAnimation的形式,估计能解决此问题。

from barragerenderer.

unash avatar unash commented on September 28, 2024

BarrageRenderer 没有用 CAAnimation,现有思路下不可能改成 CAAnimation 实现方式。目前 CADisplayLink 使用的是 RunLoopCommonModes,这已经是一个高优先级了。卡顿很严重吗?

from barragerenderer.

xy853535182 avatar xy853535182 commented on September 28, 2024

很严重倒是不会,就是弹起键盘的时候卡顿一下,强迫症感觉难受,不是很完美,我这边QA也给提了bug,寻思着你这边能否给予修复。你可以github上的demo下载下来加个输入框感受一下。

from barragerenderer.

chakery avatar chakery commented on September 28, 2024

我也遇到了这样的问题,键盘弹起时,弹幕突然停顿了一下。

from barragerenderer.

hahaGitHub avatar hahaGitHub commented on September 28, 2024

对呢,这个问题能不能修改一下,毕竟影响到了用户体验

from barragerenderer.

langlang1015 avatar langlang1015 commented on September 28, 2024

@xy853535182 键盘停顿的问题解决了吗??

from barragerenderer.

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.