gpt4 book ai didi

ios - 'UITouch' 没有可见的@interface 声明选择器 'locationInView'

转载 作者:行者123 更新时间:2023-11-29 12:33:08 26 4
gpt4 key购买 nike

我的应用程序运行良好,今天我开始收到这些随机错误

“UITouch”没有可见的@interface 声明选择器“locationInView”

我不明白,因为它在今天之前工作得很好,今天才开始这样做,我的代码是:

UITouch *touch = [[event allTouches] anyObject];
CGPoint touchPoint = [touch locationInView:self.view];

我已经导入了我需要的所有东西,我什至检查了 UITouch 类,它确实声明了“locationInView”方法,所以我不知道为什么会发生这种情况,如果我能得到任何帮助,我将不胜感激,拜托&谢谢!

最佳答案

只是替换

- (void)touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {

- (void)touchBegan:(CCTouch *)touch withEvent:(CCTouchEvent *)event {

了解更多信息。 http://www.spritebuilder.com/update

关于ios - 'UITouch' 没有可见的@interface 声明选择器 'locationInView',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27058551/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com