调用的方法,在这里封装成单独的方法方便调用,如下:
GDTSplashAd *splashAD = [[GDTSplashAd alloc] initWithAppkey:@"1105344611" placementId:@"9040714184494018"];
splashAD.delegate = self;
if ([[UIScreen mainScreen] bounds].size.height >= 568.0f)
{
splashAD.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"icon_bg"]];
}
else
{
splashAD.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"icon_bg"]];
}
splashAD.fetchDelay = 3;
self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 100)];
UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_nodata"]];
[self.bottomView addSubview:logo];
logo.center = self.bottomView.center;
self.bottomView.backgroundColor = [UIColor whiteColor];
[splashAD loadAdAndShowInWindow:self.window withBottomView:self.bottomView];
self.splash = splashAD;