简体   繁体   English

将智能(动态)Admob横幅广告定位到iOS屏幕底部?

[英]Position smart (dynamic) Admob banner to bottom of iOS screen?

I'm creating a smart (dynamic) Admob banner like this 我正在创建一个像这样的智能(动态)Admob横幅

bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait origin:CGPointMake(0,0)];

But how do I get it so a smart adMob banner is at the bottom of the screen? 但是,如何获得智能的adMob标语? I need to know the height of the banner to be able to work out where at the bottom it's y coordinate should be, but I don't see how you do that if it's a smart (dynamically) sized banner? 我需要知道横幅的高度,以便能够确定y坐标应位于底部的哪个位置,但是如果它是智能(动态)尺寸的横幅,我不知道如何处理?

I figured it out if this helps anyone 我想出这是否可以帮助任何人

bannerView = [[GADBannerView alloc] initWithAdSize:kGADAdSizeSmartBannerPortrait origin:CGPointMake(0,0)];

                [bannerView setFrame:CGRectMake(0,Sparrow.stage.height-bannerView.frame.size.height, bannerView.frame.size.width, bannerView.frame.size.height)];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM