Comments (6)
看了一下源码,弹幕文字的动画是通过注册CADisplayLink 指定update方法不停的改变的x和y坐标实现动画的,但是UITextField键盘事件的优先级比CADisplayLink事件高,runloop被添加进来了一个高优先级的任务,CADisplayLink下一次的调用就会被暂停转而先去执行高优先级的任务,然后在接着执行CADisplayLink的调用,从而造成动画过程的卡顿,使动画不流畅。作者能帮忙解决一下这个问题吗,建议动画能改成用CABasicAnimation的形式,估计能解决此问题。
from barragerenderer.
BarrageRenderer 没有用 CAAnimation,现有思路下不可能改成 CAAnimation 实现方式。目前 CADisplayLink 使用的是 RunLoopCommonModes,这已经是一个高优先级了。卡顿很严重吗?
from barragerenderer.
很严重倒是不会,就是弹起键盘的时候卡顿一下,强迫症感觉难受,不是很完美,我这边QA也给提了bug,寻思着你这边能否给予修复。你可以github上的demo下载下来加个输入框感受一下。
from barragerenderer.
我也遇到了这样的问题,键盘弹起时,弹幕突然停顿了一下。
from barragerenderer.
对呢,这个问题能不能修改一下,毕竟影响到了用户体验
from barragerenderer.
@xy853535182 键盘停顿的问题解决了吗??
from barragerenderer.
Related Issues (20)
- pod 集成报错
- 项目无法打开
- 更改字体 HOT 1
- 固定数量的弹幕,如何循环显示?
- 单条弹幕的暂停与恢复
- Swift - 自定义弹幕报错:Redundant conformance of 'DanmakuView' to protocol 'BarrageViewProtocol'
- Expose params in BarrageDescriptor class HOT 1
- shadowColor and shadowOffset not work for UILabel(BarrageView) HOT 3
- MLEmojiLabel 这个文件 报错
- 弹幕停顿1-2s
- 如何自定义文字的背景视图 HOT 3
- 如何做成类似tableview,有消息的时候消息从下往上出现消息,而且怎么固定行呐
- 手机特别烫,如何优化一下会好
- CPU起步56%,随着速度的减慢,CPU能达到90%以上
- 应该采用opengl es绘制比较好
- 内存泄漏
- 自定义UI 问题
- 关于弹幕重叠的问题 HOT 7
- `spriteQueueWithDelayLessThan` 里面的逻辑好奇怪 HOT 1
- 请问能否实现几个弹幕并排前进的效果(图) HOT 2
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 barragerenderer.