我正在一個應用程序的電話差距,所以我只處理web視圖。在這個應用程序,我需要把廣告放在屏幕的底部。我正在使用谷歌admob這個。這會生成浮動廣告窗口。我把這個窗口放在屏幕的底部,但問題是我的webview內容隱藏在這個窗口的後面。谷歌admob不可點擊裏面的矩形
因此,我製作了一個矩形,並在此矩形中添加了此Google admob窗口。它解決了我的數據隱藏問題,但現在它不能點擊。
我的代碼:
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
theWebView.backgroundColor = [UIColor blackColor];
CGRect viewBounds = CGRectMake([[UIScreen mainScreen] applicationFrame].origin.x, [[UIScreen mainScreen] applicationFrame].origin.y, [[UIScreen mainScreen] applicationFrame].size.width, [[UIScreen mainScreen] applicationFrame].size.height-CGSizeFromGADAdSize(kGADAdSizeBanner).height);
self.view.frame = viewBounds;
CGPoint origin = CGPointMake(0.0,theWebView.frame.size.height);
bannerView_ = [[[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin] autorelease];
bannerView_.adUnitID = @"___ADMOBID___";
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];
return [super webViewDidFinishLoad:theWebView];
}
如何使矩形(的CGRect)在AdMob點擊???
在此先感謝...
我在哪裏添加上面的代碼?... – KiShOrE