Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Problems with Objective-C

  1. Aug 15, 2014 #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
  2. jcsd
  3. Aug 15, 2014 #2
    I think the function above it is missing a closing brace }
  4. Aug 15, 2014 #3


    Staff: Mentor

    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.
  5. Aug 15, 2014 #4
    I already tried touchesBegin :( I get it to work.
  6. Aug 15, 2014 #5
    Thank you guys so much. As a beginner developer, thank you so much
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook