- (voID)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UItouch * touch = [touches anyObject]; gestureStartPoint = [touch locationInVIEw:self];}解决方法 根据 UISwipeGestureRecognizer documentation你可以:
You may determine the location where a swipe began by calling the UIGestureRecognizer methods locationInVIEw: and locationOftouch:inVIEw:. The former method gives you the centroID if more than one touch was involved in the gesture; the latter gives the location of a particular touch.
PS:你真的应该先看看文档,答案是在UISwipeGestureRecognizer的类引用中,应该不难找到.作为开发人员的一部分是能够查找的东西,Apple有优秀的文档,使用它!
总结以上是内存溢出为你收集整理的iphone – UISwipeGestureRecognizer手势起点全部内容,希望文章能够帮你解决iphone – UISwipeGestureRecognizer手势起点所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)