iOS 8 SpriteKit crashes on adding or removing a child from block/action

后端 未结 1 380
既然无缘
既然无缘 2021-02-05 19:39

As of iOS8 my game started to crash all of a sudden. After a bit of debugging I have found that the game crashes in the two following places :

 [sparkNode runAct         


        
相关标签:
1条回答
  • 2021-02-05 20:23

    I faced with a problem in enumerate in iOs8:

    [supers enumerateChildNodesWithName:@"super3" usingBlock:^(SKNode *node, BOOL *stop) {
     ....
                [supers addChild:super3counter]; //crash here
    }]; 
    

    dispatch_async helped too.

    And note all: crash not occured immidiatly - it takes about 0.5 sec, and code befro and after can be even executed.

    0 讨论(0)
提交回复
热议问题