触摸时旋转视图
我必须在手指触摸时循环旋转视图...我的意思是像拨打旧电话号码...触摸应该只在角落...任何人都可以帮助我...我已经尝试过一次很多...但没有成功
I have to rotate a view circularly on finger touch...I mean like dialing the old phones number...and the touch should be only on corners.....can any one help me...i have tried it a lot...but was not successes
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在要旋转的视图上定义
UIRotationGestureRecognize
,然后添加选择器方法并像这样实现它。将其添加到您的
viewDidLoad
方法中,然后实现该方法。
附言。
myUIViewObject
可以是您想要旋转的任何UIView
对象。编辑:
您将在这里找到很多相关信息:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/49847-how-find-angle-two-points.html
You need to define the
UIRotationGestureRecognize
on the view that you want to rotate and than add a selector method and implement it like this.Add this to you
viewDidLoad
methodAnd then implement the method.
PS.
myUIViewObject
can be anyUIView
Object that you want to rotate.Edit:
you will find a lot of information on this here:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/49847-how-find-angle-two-points.html