implementing iAd Framework ADBannerView on iOS4

Putting ads in your iPhone app is as simple as adding an ADBannerView to your view. You can alter the location of the view by changing CGRectZero to CGRectMake(x, y, 0, 0) or altering the position of the view.

[code lang="c"]ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifier320x50;
[self addSubview:adView];[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *