使用 iAd。很少收到警告。下面是我在 AppDelegate.m 中的代码
什么不见了?
警告以代码行结尾表示
-(void)onEnter
{
[super onEnter]; //<-- NSObject may not respond to this
adView = [[ADBannerView alloc]initWithFrame:CGRectZero];
adView.delegate = self;
adView.requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierLandscape, ADBannerContentSizeIdentifierLandscape, nil];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape;
[[[CCDirector sharedDirector] openGLView] addSubview:adView];
adView.hidden = YES;
}
-(void)onExit
{
adView.delegate = nil;
[adView removeFromSuperview];
[adView release];
adView = nil;
[super onExit]; //<-- NSObject may not respond to this
}
-(void)bannerViewActionDidFinish :(ADBannerView *)banner
{
NSLog(@"bannerViewActionDidFinish called");
[[UIApplication sharedApplication] setStatusBarOrientation :(UIInterfaceOrientation)[[CCDirector sharedDirector] deviceOrientation]];
}
//<-- Instance method deviceOrientation not found (return type defaults to id)
怎么了?缺少要继承的任何类?