[iOS] iAD sample

스크린샷 2014-03-26 오전 10.17.51

iAd 프레임웍을 추가한다

 

 

#import <iAd/iAd.h>

... <ADBannerViewDelegate>

#pragma mark - iAD
-(void)bannerViewDidLoadAd:(ADBannerView *)banner
{
	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:1];
	[banner setAlpha:1];
	[UIView commitAnimations];
}

- (void)bannerView:(ADBannerView *)banner didFailToReceiveAdWithError:(NSError *)error
{
	[UIView beginAnimations:nil context:nil];
	[UIView setAnimationDuration:1];
	[banner setAlpha:0];
	[UIView commitAnimations];
}

소스를 넣고

 

스크린샷 2014-03-26 오전 10.19.35

ADbannerView를 올리고, delegate를 연결한다.

이게 전부인가? ;;;;

 

 

도움받은 곳