0

私は、プロジェクトの最後に追加されるadmobバナーの画面の下部に高さが約100個(ユニットがわからない)を残しました。 iphone 6の場合Admobのバナーの下にどれくらいのスペースを残す必要がありますか?

、AdMobのバナーの高さは約100

しかし、私はiPadに移動すると、この高さが異なっています。

したがって、一部の要素の位置(高さ方向)が異なります。私のようにDesignResolutionを設定

float admobHeight = 100.0; 

Vec2 desiredPosition = Vec2(0, 100); 

auto sprite = Sprite::create("image.png"); 
sprite->setAnchorPoint(Vec2(0, 0)); 

// Leave out space for the bottom Admob banner. 
sprite->setPosition(Vec2(desiredPosition.x, desiredPosition.y + admobHeight)); 

this->addChild(sprite); 

:たとえば

(AppDelegate.cpp) 

static cocos2d::Size designResolutionSize = cocos2d::Size(768, 1136); 

と解決方針NO_BORDER:

glview->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, ResolutionPolicy::NO_BORDER); 

はどのようにして、高さのスペースのちょうど右の量を残すことができますすべての種類の端末でAdMobの画面の下部に表示されますか?

+0

https://developers.google.com/android/reference/com/google/android/gms/ads/AdSize –

+0

http://stackoverflow.com/questions/21846346/admob-with-cocos2d- v3/21859218#21859218 – Guru

答えて

0

標準バナーの高さは、ここで60PX あるAdMobのバナー統合

bannerView_ = [[GADBannerViewのアロケーション] initWithFrameためのコードである:CGRectMake(0、viewController.view.frame.size.height-60、viewController.view .frame.size.width、60)]; bannerView_center = CGPointMake(viewController.view.frame.size.width/2.f、viewController.view.frame.size.height-30); bannerView_.adUnitID = ADMOB_BANNER_ID;

bannerView_.rootViewController=self.viewController; 

    //[UIViewController:addSubview:bannerView_]; 
    [viewController.view addSubview:bannerView_]; 
    // Initiate a generic request to load it with an ad. 
    [bannerView_ loadRequest:[GADRequest request]]; 
関連する問題