我用下面的代碼添加橫幅:iAd的橫幅崩潰的應用程序
- (void) addBunner {
CGRect frame = CGRectMake(0.0,
self.view.frame.size.height-50.0,
320.0,
50.0);
UIWindow* window = [UIApplication sharedApplication].keyWindow;
if (!window) {
window = [[UIApplication sharedApplication].windows objectAtIndex:0];
}
ADBannerView *adView = [[ADBannerView alloc] initWithFrame:frame];
adView.delegate=self;
[window addSubview:adView];
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self addBunner];
}
加入iAd.framework。
應用程序在日誌中沒有任何消息時崩潰。問題在哪裏?