Ads in whole app iPhone problem

Posted by lars on Stack Overflow See other posts from Stack Overflow or by lars
Published on 2010-04-13T11:39:34Z Indexed on 2010/04/13 11:43 UTC
Read the original article Hit count: 251

Filed under:
|
|
|
|

I am using mobclix together with admob. The code is to big to add it in all classes. So i created a new class: Ads

Everytime i want an ad in a view, i have to send the view to the ad class:

- (void)initAd:(UIView *) pView {
NSLog(@"ads init");
self.loadedView = pView;
.....

To create an ad in a class:

    Ad* ad = [Ads new];
    [ad initAd:self.view];

I dont know if thats the right way. I have to create a new Ads object everytime i change a view (or class). Is there a way to always have an Ads instance running, or is there another better way?

Thanks alot!!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about mobclix