程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> cocos2d-報錯: unrecognized selector sent to instance

cocos2d-報錯: unrecognized selector sent to instance

編輯:編程綜合問答
報錯: unrecognized selector sent to instance

AppDelegate中接收RevMobAdsDelegate,但是下面的調用有錯誤。

[3496:207] [RevMob myapplication App]
SetChartBoostRequestFlag - StopLoadingWait
[3496:207] [RevMob myapplication App] StopLoadingWait routine
[3496:207] [RevMob] Starting RevMobAds
[3496:207] [RevMob] Initializing Fullscreen.
[3496:207] -[AppDelegate setFullscreen:]: unrecognized selector sent to instance    0xa20b4e0
(gdb) 

已經將RevModAds添加到代碼中了。在加載的時候應用還會崩潰。
安裝RevMobads sdk http://sdk.revmob.com/ios.html#fullscreen

最佳回答:


  #define REVMOB_APP_ID @"50cd7e844ae728120000003f"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 
  {  
            [RevMobAds startSessionWithAppID:REVMOB_APP_ID];
            [self showAds];
            ..
            ..
  }

  -(void)showAds  //call this from game over, game pause
  {
            [[RevMobAds session] showFullscreen];
  }

試試看

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved