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
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top