当我尝试将其集成到我的精灵套件游戏中时,我无法将iAd横幅显示在屏幕顶部以外的任何位置。 这就是我在我的视图中所拥有的控制器.m
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
_adview = [[ADBannerView alloc] initWithFrame:CGRectZero];
_adview.delegate = self;
[_adview setFrame:CGRectMake(0, 0, 1024, 768)];
[self.view addSubview:_adview];
//[_adview setAlpha:0];
SKView * skView = (SKView *)self.view;
// Create and configure the scene.
MyScene * scene = [MyScene sceneWithSize:skView.bounds.size];
scene.scaleMode = SKSceneScaleModeAspectFill;
scene.viewContoller = self;
// Present the scene.
[skView presentScene:scene];
}
答案 0 :(得分:0)
我对类似问题的回答我帮助你。
还尝试在viewWilllayoutSubviews中初始化广告横幅,而不是viewDidLoad。
How can I place a SpriteKit AdBanner at the Top of the View?