你好,歡迎來到IOS教程網

 Ios教程網 >> IOS訊息 >> 關於IOS >> [UIView setShowsFPS:]: unrecognized selector sent to instance XXX

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

編輯:關於IOS

今天在做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'

 

  1. 上一頁:
  2. 下一頁:
蘋果刷機越獄教程| IOS教程問題解答| IOS技巧綜合| IOS7技巧| IOS8教程
Copyright © Ios教程網 All Rights Reserved