带 UIImages 指针的模拟时钟?
我想知道如何在iPhone SDK中制作模拟时钟。但是,我希望时钟的指针是自定义图像,而不是像本教程中那样绘制的正方形: http://iphone-dev-tips.alterplay.com/2010/03/analog-clock-using-quartz-core.html
的问题该教程是用 Quarzt Core 绘制时钟指针。只要手可以定制,我就可以接受。以这种方式制作模拟时钟的最简单方法是什么?
I want to know how to make an analog clock in iPhone SDK. However, I want the hands of the clock to be custom images and not squares drawn over like in this tutorial: http://iphone-dev-tips.alterplay.com/2010/03/analog-clock-using-quartz-core.html
The problem with that tutorial is that the clock hands are drawn with Quarzt Core. I'm okay with that as long as the hands could be custom. What would be the easiest way to make an Analog Clock this way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 CALayers 进行操作。这样就容易得多,而且性能也更好。
更新:
我写了一个使用 CALayers 的 ClockView 示例,也许你会发现它很有用。
Do it with CALayers. is WAY much easier and performance is better this way.
UPDATE:
I wrote a ClockView sample using CALayers, maybe you find it useful.
这个使用 raphael js
http://jsfiddle.net/8srjq/
希望有用
this one uses raphael js
http://jsfiddle.net/8srjq/
hope useful