项目介绍:
~~ 最新版本请Github欢迎Star: 获取最新版本Github
~~ 支持 pod ‘JWLaunchAd’
[Objective-C] 查看源文件 复制代码
// 1.设置启动页广告图片的URL NSString *imgUrlString =@"http://imgstore.cdn.sogou.com/app/a/100540002/714860.jpg"; // 2.初始化启动页 [JWLaunchAd initImageWithAttribute:6.0 showSkipType:SkipShowTypeAnimation setLaunchAd:^(JWLaunchAd *launchAd) { __block JWLaunchAd *weakSelf = launchAd; //如果选择 SkipShowTypeAnimation 需要设置动画跳过按钮的属性 [weakSelf setAnimationSkipWithAttribute:[UIColor redColor] lineWidth:3.0 backgroundColor:nil textColor:nil]; [launchAd setWebImageWithURL:imgUrlString options:JWWebImageDefault result:^(UIImage *image, NSURL *url) { // 异步缓冲图片完成后调整图片Frame weakSelf.launchAdViewFrame = CGRectMake(0, 0, kScreen_Width, kScreen_Height-100); } adClickBlock:^{ // 3.广告回调 NSString *url = @"https://www.baidu.com"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]]; }]; }];