[UIView setShowsFPS:]: unrecognized selector sent to instance XXX


 

今天在做sprite Kit game时遇到一个问题。

新建一个项目运行时发现就加了这几句代码无法运行。后来一查原来是storyboard uiview要改一下。改成SKview

In your storyboard, did you set the 'custom class' of the VC's root view to SKView?

 SKView *spriteView = (SKView*)self.view;
    
    spriteView.showsFPS = YES;
    spriteView.showsDrawCount = YES;
    spriteView.showsNodeCount = YES;

选择storyboard 然后找到右边 Sustom Slass 把Class 改成SKView

2013-08-13 14:17:08.678 SpriteWalkthrough[12416:c07] -[UIView setShowsFPS:]: unrecognized selector sent to instance 0x9742e30

2013-08-13 14:17:08.679 SpriteWalkthrough[12416:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setShowsFPS:]: unrecognized selector sent to instance 0x9742e30'

 

 




					


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM