为“UITouch”不可见的@interface声明选择“locationInView”
问题描述:
我的应用程序工作正常,今天我开始读取为“UITouch”不可见的@interface声明选择“locationInView”
no visible @interface for 'UITouch' declares the selector 'locationInView'
这些随机错误,我不明白,因为它是今天的工作之前完全没有刚开始这样做,今天我的代码是:
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchPoint = [touch locationInView:self.view];
我所拥有的一切进口,我需要&我甚至在UITouch类检查发现其有“locationInView”方法宣布他们,所以我不知道为什么会发生这种情况,我将不胜感激任何帮助,我可以得到,请&谢谢!
答
只是
- (void)touchBegan:(CCTouch *)touch withEvent:(CCTouchEvent *)event {
更换
- (void)touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
这里需要使用第三方api – 2016-09-08 10:46:23