我想实现一个非常简单的iAd进入我的游戏,我得到一个错误。我是Xcode的新手,无法读取错误代码。我在一个新的SpriteKit项目中尝试了完全相同的方法,并且它完美地工作。我猜这肯定与我的比赛有关。UIView从实施iAd的错误
错误如下。
2014-03-30 17:18:35.966 MyGame[672:60b] -[UIView setPaused:]: unrecognized selector sent to instance 0xa764120 2014-03-30 17:18:35.970 MyGame[672:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setPaused:]: unrecognized selector sent to instance 0xa764120' *** First throw call stack: ( 0 CoreFoundation 0x019901e4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x0170f8e5 objc_exception_throw + 44 2 CoreFoundation 0x01a2d243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275 3 CoreFoundation 0x0198050b ___forwarding___ + 1019 4 CoreFoundation 0x019800ee _CF_forwarding_prep_0 + 14 5 MyGame 0x00-[AppDelegate applicationDidBecomeActive:] + 225 6 UIKit 0x002a6ca6 -[UIApplication _stopDeactivatingForReason:] + 329 7 UIKit 0x002ac891 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 1378 8 UIKit 0x002c0f92 -[UIApplication handleEvent:withNewEvent:] + 3517 9 UIKit 0x002c1555 -[UIApplication sendEvent:] + 85 10 UIKit 0x002ae250 _UIApplicationHandleEvent + 683 11 GraphicsServices 0x025d9f02 _PurpleEventCallback + 776 12 GraphicsServices 0x025d9a0d PurpleEventCallback + 46 13 CoreFoundation 0x0190bca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 14 CoreFoundation 0x0190b9db __CFRunLoopDoSource1 + 523 15 CoreFoundation 0x0193668c __CFRunLoopRun + 2156 16 CoreFoundation 0x019359d3 CFRunLoopRunSpecific + 467 17 CoreFoundation 0x019357eb CFRunLoopRunInMode + 123 18 UIKit 0x002abd9c -[UIApplication _run] + 840 19 UIKit 0x002adf9b UIApplicationMain + 1225 20 MyGame 0x0001250d main + 141 21 libdyld.dylib 0x02ad8701 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)
我ViewController.m是如下
常见问题,iAd用自己替换视图控制器的视图,请看这里:http://stackoverflow.com/questions/19521677/what-does-the-iad-uiviewcontroller-category-candisplaybannerads-do – LearnCocos2D