Problems with Objective-C

  • #1
Hello, I am making an iOS game, written in Objective-C, but I have recently encountered a problem. If you can help me, I would appreciate it alot.
ImageUploadedByPhysics Forums1408081969.744984.jpg
If it's hard to read, it say
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {


The problem says
"Use of undeclared identifier 'touchesBegan'"

Thank you,
Ignacio Cabero
 

Answers and Replies

  • #2
2,055
319
I think the function above it is missing a closing brace }
 
  • #3
35,641
7,516
I think the function above it is missing a closing brace }

I don't think that's it. I see the closing brace in the thumbnail.

Could it be that you have the wrong function name? Should it be touchesBegin instead? Check the iOS or other appropriate documentation to make sure you're using the correct function names.
 
  • #4
I already tried touchesBegin :( I get it to work.
 
  • #5
Thank you guys so much. As a beginner developer, thank you so much
 

Related Threads on Problems with Objective-C

  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
5
Views
977
  • Last Post
Replies
2
Views
2K
Replies
3
Views
5K
  • Last Post
Replies
1
Views
2K
Replies
9
Views
2K
Replies
1
Views
2K
Replies
1
Views
475
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
4
Views
3K
Top