no visible @interface for 'UITouch' declares the selector 'locationInView'

719 views Asked by At

My app was working fine and today I started getting these random errors that read

no visible @interface for 'UITouch' declares the selector 'locationInView'

which I don't get because it was working perfectly fine before today and just started doing this today my code is:

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

I have everything imported that I need to & I even checked in the UITouch class and it did have the "locationInView" method declared their so I don't know why this is happening I would appreciate any help I can get, please & thanks!

1

There are 1 answers

1
Mariam On

Just replace

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

with

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

for more info. http://www.spritebuilder.com/update