【问题标题】:iAd banner to bottom of landscape screen in spritekit在 spritekit 中横向屏幕底部的 iAd 横幅
【发布时间】:2014-07-14 23:39:55
【问题描述】:

当我尝试将 iAd 横幅集成到锁定在横向模式的精灵套件游戏中时,我无法让 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];
}

【问题讨论】:

    标签: ios xcode iad


    【解决方案1】:

    我对类似问题的回答可以帮助您。

    还可以尝试在 viewWilllayoutSubviews 中初始化广告横幅,而不是 viewDidLoad。

    How can I place a SpriteKit AdBanner at the Top of the View?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-01
      • 2015-06-01
      相关资源
      最近更新 更多