iOS的AssistiveTouch慢动画使用自定义键盘时, [英] iOS AssistiveTouch slow animation when using custom keyboard
问题描述
我建立一个自定义的键盘,一切都很好,现在,当我我自定义键盘期间使用AssistiveTouch启用除,AssistiveTouch的动画是有点laggy(缓慢放大,缩小),当水龙头打开吧。
I'm building an custom keyboard, everything is fine now, except when i'm using AssistiveTouch during my custom keyboard is enabled, the animation of AssistiveTouch is little bit laggy (slow zoom in , zoom out) when tap to open it.
我在iPhone 4S和iPhone 6,同患难测试,所以我觉得是不是设备硬件或资源消耗。
I tested on iPhone 4s and iPhone 6 , same trouble, so i think is not about device hardware or resource consume.
有同样的问题或知道原因,有人吗?如何解决呢?
Anyone having same trouble or know reason? and how to solve it ?
推荐答案
我找到原因我自己。因为影子。
我添加阴影每个按钮,删除阴影后,滞后没有出现了。
I found reason by myself. that because of shadow. i added shadow for each button, after remove shadow, the lag didn't appear anymore.
所以任何人提出一些更好的方法来添加阴影的一个按钮laggy?
so anyone suggest some better way to add shadow to button without laggy?
这是我的方式来增加阴影按钮:
this is my way to add shadow to button:
button.layer.masksToBounds = false
button.layer.shadowColor = UIColor(rgb: 0x000000, alpha: 0.5).CGColor
button.layer.shadowOpacity = 1.0
button.layer.shadowRadius = 0
button.layer.shadowOffset = CGSizeMake(0, 1.0)
这篇关于iOS的AssistiveTouch慢动画使用自定义键盘时,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!