我用下面的代码添加横幅: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。
应用程序在日志中没有任何消息时崩溃。问题在哪里?