mqzhot / zlaunchad Goto Github PK
View Code? Open in Web Editor NEW快速集成启动广告,支持LaunchImage和LaunchScreen,支持GIF,支持本地图片,支持视图过渡动画
License: MIT License
快速集成启动广告,支持LaunchImage和LaunchScreen,支持GIF,支持本地图片,支持视图过渡动画
License: MIT License
private func image(url: URL, cache: Bool, completion:@escaping (UIImage?)->()) {
guard let imageData = try? Data(contentsOf: url) else {
return
}
if cache {
saveImage(imageData, url: url, completion: nil)/// 存储
}
let image = self.image(data: imageData)
completion(image)
}
在网络不好的情况下,下载缓慢,会卡在这里,
please support Swift Package Manager
图片加载时间是200ms,也进行过压缩
升级 XCode 10 后,报以下错误
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/CommonCrypto/module.modulemap:1:8: Redefinition of module 'CommonCrypto'
动画启动播放时内存突然暴涨到 400多M
很方便,谢谢!
不过目前设置 showEnterForeground 为 true 时,每次 UIApplicationWillEnterForeground 都会进行触发,对于某些场景来说过于频繁。
建议在 showEnterForeground 为 true 时同时接受一个间隔时间,只有进入后台后返回的时间大于间隔才进行显示。
更自由的一个方案是接受自定义 NSNotification.Name 事件,需要展示时用户自行发送事件进行触发。
请参考
let adView = ZLaunchAd.create(waitTime:1)
这个函数是你新加的吗,提一下cocoapod呗
error: no such module 'CCommonCrypto'
import CCommonCrypto
^
** ARCHIVE FAILED **
The following build commands failed:
CompileSwift normal arm64
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
ZLaunchAd 網絡不好的時候 會閃退
接口和图片的大小都有进行优化咯,还有什么可能原因造成呢?
倒计时结束后可能需要做一些顺序执行的工作, 然后在启动主ViewController
Demo里面也有这个问题
不支持swift4.2
如题,谢谢
pod下来之后发现文件不是master上最新的,现在代码中还存在UIViewAnimationOptions ,swift5不支持
网络差的时候,会一直卡在广告也,知道下载完成,能优化吗
launchImageView 某些情况下是空白,把111的图片换了就出现这种情况,storyboardLaunchImage() 数据是有,但是显示是空白 (Demo显示是正常,但是Demo的一换图片就出现这种情况,不确定是模拟器的原因还是其他)
2018-07-16 15:39:05.476780+0800 redou[21518:1753128] [Debug] [main] [MYPWalkThroughVC.swift:16] viewDidLoad() > Run walk.
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:3
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:2
ZLaunchAdCache.swift[75], createBaseDirectoryAtPath: ZLaunchAd cache directory =
/var/mobile/Containers/Data/Application/C1BEA3DB-8141-42AD-AFA4-BC74E6D0C86A/Library
/ZLaunchAdCache
ZLaunchAdCache.swift[58], getCacheImageWithURL:
Error Domain=NSCocoaErrorDomain Code=260 "
The file “F3AFE0B0A143B45CFED8C180C54A496A” couldn’t be opened because there is no such file."
UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/C1BEA3DB-8141-42AD-AFA4-BC74E6D0C86A/Library/
ZLaunchAdCache/F3AFE0B0A143B45CFED8C180C54A496A,
NSUnderlyingError=0x10fb31510 {Error Domain=NSPOSIXErrorDomain Code=2
"No such file or directory"}}
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:1
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等等\345\276待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
ZLaunchAdView.swift[196], startTimer(): 等待加载计时:0
进不去。
有没有倒计时结束时的回调函数
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.