所以我使用以下 ANSWER 从我的 skscene 返回到我的 View Controller 从我之前问过的一个问题。但是现在自 ios8 以来,我现在收到一条错误消息。自 ios8 发布以来,还有其他人处理过这个问题吗?他们是如何解决的?
'NSInvalidArgumentException', reason: '-[TCAMyScene setDelegate:]: unrecognized selector sent to instance 0x79485190'
现在从这个答案Delegate not found我试过改变
theScene.delegate = self;
为了..
[(TCAMyScene *)theScene setDelegate:self];
但我仍然得到同样的错误。 这是我收到的警告……
最佳答案
赋值语句应该是
((TCAMyScene)theScene).myDelegate = self;
或
[(TCAMyScene)theScene setMyDelegate:self];
如果您将 delegate
更改为 myDelegate
,
关于ios - 无法将 SKScene 委托(delegate)设置为自 ios8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27001313/