Why Does Use of Undeclared Identifier 'touchesBegan' Error Occur in Objective-C?

  • Thread starter Thread starter ignaciocabero
  • Start date Start date
AI Thread Summary
The discussion centers on a problem encountered by a beginner iOS game developer, Ignacio Cabero, who received an error message stating "Use of undeclared identifier 'touchesBegan'" in Objective-C. Participants suggested checking for a missing closing brace, but Ignacio confirmed it was present. Another suggestion was to verify the function name, with a mention of "touchesBegin" as a possible alternative. Ultimately, Ignacio resolved the issue and expressed gratitude for the assistance, highlighting the supportive nature of the developer community.
ignaciocabero
Messages
10
Reaction score
0
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
 
Technology news on Phys.org
I think the function above it is missing a closing brace }
 
willem2 said:
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.
 
I already tried touchesBegin :( I get it to work.
 
Thank you guys so much. As a beginner developer, thank you so much
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top