@interface NADViewEx : UIView
<NADViewDelegate>
{
NADView* _nadView;
}
-(id)initWithFrame:(CGRect)frame rootViewController:(UIViewController*)rootViewController;
@end
- (id)initWithFrame:(CGRect)frame rootViewController:(UIViewController*)rootViewController
{
self = [super initWithFrame:frame];
if (self) {
// NADView
_nadView = [[NADView alloc] initWithFrame:frame];
[_nadView setNendID:NAD_KEY spotID:NAD_ID];
[_nadView setBackgroundColor:[UIColor clearColor]];
[_nadView setRootViewController:rootViewController];
[_nadView setDelegate:self];
[_nadView load:nil];
[self addSubview:_nadView];
}
return self;
}
-(void) dealloc
{
_nadView.delegate = nil;
[_nadView release];
[super dealloc];
}
// Adの初回読み込み完了
-(void) nadViewDidFinishLoad:(NADView *)adView
{
NSLog(@"Ad初回読み込み成功");
}
// Adの読み込み完了通知
-(void) nadViewDidReceiveAd:(NADView *)adView
{
NSLog(@"Ad読み込み成功");
}
// Adの読み込み失敗通知
-(void) nadViewDidFailToReceiveAd:(NADView *)adView
{
NSLog(@"Ad読み込み失敗");
}
@end
コメントする