开发者

Objective C wheel menu for iPhone

I want to create a rotating wheel menu which the user can use his/her finger to rotate the menu.

I understand how to rotate the circl开发者_StackOverflow中文版e but I have no idea how to rotate it when the user drags it using his/her finger in the right direction that hte user is dragging the wheel in.

Any help please?

Thank you!


That's a matter of trigonometry. You need to find the heading from the wheels center to the touch location, then you let your wheel rotate to that heading.

It might help to convert the involved coordinates into "wheelview"s parent view coordinate system, to avoid confusion if the wheelview itself is the rotating part.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜