0
我終於有iAds工作,我將如何使廣告不顯示在我的遊戲場景?禁用iAds在不同的場景Cocos2d 3.0
這是我的iAds代碼
- (id)init
{
{
if ([ADBannerView instancesRespondToSelector:@selector(initWithAdType:)]) {
_adView = [[ADBannerView alloc] initWithAdType:ADAdTypeBanner];
} else {
_adView = [[ADBannerView alloc] init];
}
_adView.requiredContentSizeIdentifiers = [NSSet setWithObject:ADBannerContentSizeIdentifierPortrait];
_adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
[[[CCDirector sharedDirector]view]addSubview:_adView];
[_adView setBackgroundColor:[UIColor clearColor]];
[[[CCDirector sharedDirector]view]addSubview:_adView];
_adView.delegate = self;
}
return self;
}
遊戲現場啓動時刪除adview – LearnCocos2D
我將使用哪些代碼將其刪除? – Crazycriss
許多選項之一:[_adView removeFromSuperview] – LearnCocos2D