iPhone添加惯性/物理势头动画"财富&QUOT轮;像旋转控制 [英] iPhone add inertia/momentum physics to animate "wheel of fortune" like rotating control

查看:173
本文介绍了iPhone添加惯性/物理势头动画"财富&QUOT轮;像旋转控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建一种新的与支持的一个引脚上一个真正的大规模轮的外观和感觉的旋转控制,能围绕它旋转的中心点具有一定的阻尼,这将最终使车轮停了下来。 认为命运之轮。

I'm trying to create a new kind of rotary control with a look and feel of a real massive wheel supported on a pin, able to rotate around it's center point with a certain degree of damping, which will eventually bring the wheel to a halt. Think "wheel of fortune".

旋转控制示例项目

当与天然的UITableView和/或的UIScrollView工作,它们可以是轻弹,并在为一个而该方向继续滚动。我知道类似的效果可与动画曲线来实现。

When working with native UITableView and/or UIScrollView, they can be "flicked" in one direction and continue scrolling in that direction for a while. I know similar effect may be achieved with the animation curve.

我很感兴趣的是如何计算的界面元素应该有多远滚动/旋转基于距离/速度手指走过。不同类型的笔触的将被转移气势的车轮产生不同的行为。任何人都可以提出这样的计算的例子吗?

What I'm interested in is how to calculate how far the interface element should scroll/rotate based on the distance/speed that the finger travelled. Different types of "flicks" would produce different behavior by transferring "momentum" to the wheel. Can anyone suggest examples of such calculations?

我申请的惯性相同的概念此处所述的自定义旋转控制特别感兴趣:<一href=\"http://stackoverflow.com/questions/9621141/iphone-ipad-circular-intensity-gauge-control-image-included\">Rotary控制在堆栈溢出。在实施例中提到的当前实施例,甚至convertbot应用不使用惯性。车轮只是跟随手指捕捉到pre定义的位置。我想做出类似车轮觉得它有真正的质量它,因此它可以轻弹,将在predictable地旋转,直到来到了一个平稳停止。 (想想型秀的幸运轮)。

I'm particularly interested in applying the same concept of inertia to a custom rotary control as described here: Rotary control on stack overflow . The current examples, and even the convertbot app mentioned in the examples do not use inertia. The wheel simply follows the finger and snaps to pre-defined positions. I want to make a similar wheel feel like it has real mass to it, so it can be flicked and will spin in a predictable manner until coming to a smooth halt. (Think "wheel of fortune" type shows).

我怎样才能达到这种对旋转控制基于惯性行为命运之轮的这将使控制感觉它有真正的质量呢?

感谢您!

推荐答案

我发现,使用 iCarousel ,它可以创建一个像车轮惯性/气势控制!

I found that using iCarousel, it is possible to create a wheel like control with inertia/momentum!

这篇关于iPhone添加惯性/物理势头动画&QUOT;财富&QUOT轮;像旋转控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆