还有比 UIButton 更快的吗?
我正在编写一个 iPhone 应用程序,它需要对触摸事件做出极快速的响应。是否有任何对象能够提供比从笔尖加载的 UIButton 的 UIControlEventTouchDown 结果更快的响应?我对任何不需要大量挖掘或逆向工程的资源都持开放态度。
提前致谢!
卢克
I'm writing an iPhone app which needs an extremely rapid response for a touch event. Is there any object that will provide a faster response than the UIControlEventTouchDown result of a UIButton loaded from a nib? I'm open to any resources that don't require extensive digging around or reverse engineering.
Thanks in advance!
Luke
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能不会。尽管您可以创建自己的
UIView
子类,它实现- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
(以及其他类似方法)。尽管这很可能正是 UIButton 为您所做的事情。如果
UIButton
不够快,请尝试子类。但我认为情况不会有太大不同。Probably not. Though you could create your own subclass of
UIView
which implements- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
(and other similar methods). Though it's likely that this is exactly what UIButton does for you anyway.If a
UIButton
isn't fast enough, try a subclass. But I don't think it will be much different.