当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
4 Star 16 Fork 1

MQZHot / ZLaunchAd
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ZLaunchAd

image image Carthage Compatible image ZLaunchAd集成启动广告,支持LaunchImageLaunchScreen,支持GIF,支持本地图片,支持视图过渡动画

image image image image image image

功能

  • 支持进入前台广告显示,设定时间间隔,进入后台后返回的时间大于间隔才进行显示
  • 接收自定义通知控制图片显示
  • 支持Objective-C/Swift
  • 自带图片缓存,清除缓存
  • 自定义跳过按钮外观、位置
  • 支持网络/本地资源,支持GIF图片显示
  • 支持LaunchImage和LaunchScreen.storyboard.
  • 支持广告点击事件,支持广告完成动画设置

安装

CocoaPods

platform :ios, '8.0'
use_frameworks!

target 'YourTargetName' do
pod 'ZLaunchAd'
end

Carthage

github "MQZHot/ZLaunchAd"

Swift Package Manager

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    dependencies: [
        .package(url: "https://github.com/MQZHot/ZLaunchAd.git", from: "2.1.0"),
    ]
)

使用

/// 进入前台时显示
func create(waitTime: Int = 3, showEnterForeground: Bool = false, timeForWillEnterForeground: Double = 10, adNetRequest: ((ZLaunchAdView)->())? = nil) -> ZLaunchAdView
/// 自定义通知控制出现
func create(waitTime: Int = 3, customNotificationName: String?, adNetRequest: ((ZLaunchAdView)->())? = nil) -> ZLaunchAdView

配置图片资源----配置跳过按钮

func setImageResource(_ imageResource: ZLaunchAdImageResourceConfigure, buttonConfig: ZLaunchSkipButtonConfig? = nil, action: ZLaunchClosure?)

页面配置

  • ZLaunchSkipButtonConfig:跳过按钮配置
  • ZLaunchAdImageResourceConfigure:配置广告图

清除缓存

/// 清除全部缓存
ZLaunchAd.clearDiskCache()

/// 清除指定url的缓存
let array = ["http://..", "http://..", "http://..", "http://.."]
ZLaunchAd.clearDiskCacheWithImageUrlArray(array)

联系

MIT License Copyright (c) 2017 MQZHot Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

swift 集成app启动页广告,支持LaunchImage和LaunchScreen.storyboard,支持GIF图片显示,支持视图过渡动画 展开 收起
Swift 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Swift
1
https://gitee.com/MQZHot/ZLaunchAdVC.git
git@gitee.com:MQZHot/ZLaunchAdVC.git
MQZHot
ZLaunchAdVC
ZLaunchAd
master

搜索帮助