如何正确实现ios7上的iAd

时间:2013-12-11 04:37:03

标签: ios7 xcode5

我正在寻找正确的代码,以便我可以实现iAds并被Apple接受

我试过了,

#import <UIKit/UIKit.h>
#import <iAd/iAd.h>
@interface Iphone : UIViewController<ADBannerViewDelegate>

现在在.m,

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

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

但不确定这是否符合指南或是正确的方法?

0 个答案:

没有答案