如何让iOS设备没有或没有能力升级到iOS 4来使用其中包含iAds的应用程序?截至目前,该应用程序只是崩溃。 iAd框架在xcode中列为optional
。这里是我的iAd代码:iAds Pre-iOS 4.0
-(void)viewWillAppear:(BOOL)animated
{
[self addBanner];
}
- (void) addBanner {
ADBannerView *adView = [[ADBannerView alloc] initWithFrame: CGRectMake(0, 0, 320, 50)];
adView. requiredContentSizeIdentifiers = [NSSet setWithObjects: ADBannerContentSizeIdentifierPortrait, ADBannerContentSizeIdentifierLandscape, nil];
adView.delegate = self;
[self.view addSubview: adView];
}
可能重复[如何让网络成瘾者在3.0 + iPhone,iPad应用程序的工作?](HTTP://计算器.com/questions/3587471/how-to-make-iads-work-on-a-3-0-iphone-ipad-app) – 2011-06-16 01:30:49