- (UIView *)addbanner{
CGPoint origin = CGPointMake(0.0, 0);
self.adBanner = [[[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin]autorelease];
headerView = [[[UIView alloc] initWithFrame:CGRectMake(0,0,320, self.adBanner.adSize.size.height)] autorelease];
self.adBanner.adUnitID = @"a14fe853330ee80";
self.adBanner.delegate = self;
[self.adBanner setRootViewController:self];
[headerView addSubview:self.adBanner];
[self.adBanner loadRequest:[self createRequest]];
return headerView;
}
- (GADRequest *)createRequest {
GADRequest *request = [GADRequest request];
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
request.testDevices = [NSArray arrayWithObjects:appDelegate.udid, nil];
return request;
}
該橫幅廣告只在iOS 6的模擬器中顯示,但不顯示設備。對於iOS 5,模擬器和設備都顯示。Google Adsmob無法在iOS 6設備上顯示
我現在正在使用分配。
什麼問題?
如何編輯它成爲分佈模式? –
@AlanLai檢查編輯答案 –
試過了,還是一樣 –