Please fix this mistake!

Discussion in 'iOS Programming' started by AlexTheXcodeProgrammer, Nov 21, 2015.

  1. AlexTheXcodeProgrammer macrumors newbie

    Oct 11, 2015
    Hello everybody, I don't know how to fix this issue which prevents me from running my game. Thank you for your time and consideration. Screen Shot 2015-11-21 at 19.58.28.png
  2. ArtOfWarfare macrumors G3


    Nov 26, 2007
    I'm going to say you need to change SKSpriteNode to NSObject in the signature.

    Then in the first line of the block you'll need a line casting child from an NSObject to an SKSpriteNode.

    Yay type safety, right? This definitely keeps you from making mistakes and in no way wastes your time or makes the code harder to read.
  3. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Trying using "id obj" instead of "SKSpriteNode * child" in your enumerateObjectsUsingBlock call. Does that fix it?

Share This Page