Latest 0.0.1
Homepage https://github.com/MQZHot/ZLaunchAdVC
License MIT
Platforms ios 8.0, requires ARC
Dependencies Kingfisher
Authors

Support
Support
CocoaPods 

swift快速集成app启动页广告,支持LaunchImage和LaunchScreen.storyboard

1.圆形跳过按钮、倒计时跳过

2.全屏广告、广告距离底部距离设置

3.跳过按钮位置可调: 屏幕右上角、右下角,广告图右下角

image
image
image
image

使用

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    window = UIWindow.init(frame: UIScreen.main.bounds)
    window?.backgroundColor = UIColor.white
    let homeVC = ViewController()
    let nav = UINavigationController.init(rootViewController: homeVC)
    if launchOptions != nil {
        /// 推送等启动时设置
        window?.rootViewController = nav
    } else {
        /// 设置跳过按钮的位置,距离底部的距离
        let adVC = ZLaunchAdVC.init(skipBtnPosition: .rightBottom, setAdParams: { (advc) in

            /// 设置图片,等待时间,过度效果等
            advc.setAdImgView(url: "http://chatm-icon.oss-cn-beijing.aliyuncs.com/pic/pic_20170331202849335.png", adDuartion: 6, adImgViewClick: {

                /// 广告点击
                let vc = UIViewController()
                vc.view.backgroundColor = UIColor.green
                homeVC.navigationController?.pushViewController(vc, animated: true)

            }, completion: {
                /// 切换跟视图
                self.window?.rootViewController = nav
            })
        })
        window?.rootViewController = adVC
    }
    window?.makeKeyAndVisible()
    return true
}

安装

1.pod ‘ZLaunchAdVC’

2.pod install / pod update

Latest podspec

{
    "name": "ZLaunchAdVC",
    "version": "0.0.1",
    "summary": "swiftu5febu901fu96c6u6210appu542fu52a8u9875u5e7fu544auff0cu652fu6301LaunchImageu548cLaunchScreen.storyboard",
    "homepage": "https://github.com/MQZHot/ZLaunchAdVC",
    "authors": {
        "mqz": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/MQZHot/ZLaunchAdVC.git",
        "tag": "0.0.1"
    },
    "source_files": [
        "ZLaunchAdDemo/ZLaunchAd",
        "ZLaunchAdDemo/ZLaunchAd/*.{swift}"
    ],
    "requires_arc": true,
    "dependencies": {
        "Kingfisher": [
            "~> 3.5.1"
        ]
    },
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This