Hi,
hab mir heute Admob runtergeladen und ins App eingebaut (ein kleines tutorial seitens google wäre gern gesehen). Ist ds wirklich so dass das folgende Code einfach im jeden ViewController eingebaut werden muss? Gibts da nichts was mir das meiste spart, oder ne Idee?
Alles anzeigen
..jedesmal is ja unnötig....
hab mir heute Admob runtergeladen und ins App eingebaut (ein kleines tutorial seitens google wäre gern gesehen). Ist ds wirklich so dass das folgende Code einfach im jeden ViewController eingebaut werden muss? Gibts da nichts was mir das meiste spart, oder ne Idee?
PHP-Quellcode
- // Place an ad at the top of the screen of an iPhone/iPod Touch.
- CGRect adFrame = CGRectZero;
- adFrame.size = GAD_SIZE_320x50;
- // Create and setup the ad view.
- GADBannerView *adView = [[GADBannerView alloc] initWithFrame:adFrame];
- adView.rootViewController = self;
- adView.adUnitID = MY_BANNER_UNITID;
- // Place the ad view onto the screen.
- [self.view addSubview:adView];
- // Request an ad without any additional targeting information.
- [adView loadRequest:nil];
..jedesmal is ja unnötig....