iphone - google admob not clickable inside rectangle -


i'm making 1 app in phone-gap i've deal in web-views only. in app need put ads in bottom of screen. i'm using google admob this. generates floating ad window. i've put window in bottom of screen problem webview content hiding behind window.

so, i've make 1 rectangle , add google admob window in rectangle. solved data hiding problem, not click able.

my code:

- (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]; } 

how make admob clickable inside rectangle (cgrect)???

thanks in advance...

you're making main view smaller, - guess - rescales contents (including webview you're placing banner view right under webview, it'll show anyways have clipstobounds flag set no in main view.

what need make webview (not main view) smaller using cgrectgetheight(self.view.bounds) - cgrectgetheight(kgadadsizebanner) (and not application frame) , lay them both out accordingly.

check self.view.clipstobounds flag , set yes whether in code or in ib in order test correct behaviour, don't see in screen won't touches.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -