这是FB提供的代码,但此广告位于顶部横幅上,我希望它适合底部横幅。是否有一个简单的方法可以更改FB广告的位置?此外,实施正在运行,测试广告正在运行。
-(void)viewDidLoad
{
[super viewDidLoad];
FBAdView *adView = [[FBAdView alloc] initWithPlacementID:YOUR_PLACEMENT_ID
adSize:kFBAdSizeHeight50Banner
rootViewController:self];
[adView loadAd];
[self.view addSubview:adView];
}
答案 0 :(得分:2)
您可以通过更改框架来移动横幅:
FBAdView *adView = [[FBAdView alloc] initWithPlacementID:YOUR_PLACEMENT_ID
adSize:kFBAdSizeHeight50Banner
rootViewController:self];
adView.frame = CGRectMake(0, self.view.frame.size.height-adView.frame.size.height, adView.frame.size.width, adView.frame.size.height);
[adView loadAd];
[self.view addSubview:adView];