ZLaunchAd集成启动广告,支持LaunchImage
和LaunchScreen
,支持GIF,支持本地图片,支持视图过渡动画
- 支持进入前台广告显示,设定时间间隔,进入后台后返回的时间大于间隔才进行显示
- 接收自定义通知控制图片显示
- 支持Objective-C/Swift
- 自带图片缓存,清除缓存
- 自定义跳过按钮外观、位置
- 支持网络/本地资源,支持GIF图片显示
- 支持LaunchImage和LaunchScreen.storyboard.
- 支持广告点击事件,支持广告完成动画设置
platform :ios, '8.0'
use_frameworks!
target 'YourTargetName' do
pod 'ZLaunchAd'
end
github "MQZHot/ZLaunchAd"
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)
- Email: [email protected]