LaunchScreenSnapshot
LaunchScreenSnapshot可保护您应用快照中的敏感数据。
安装
LaunchScreenSnapshot可通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile即可:
pod 'LaunchScreenSnapshot'
Carthage安装它
或者,您可以使用github "alexruperez/LaunchScreenSnapshot"
Swift Package Manager安装它
或者,您可以使用dependencies: [
.Package(url: "https://github.com/alexruperez/LaunchScreenSnapshot.git")
]
使用方法
保护你的应用程序快照
LaunchScreenSnapshot.protect()
取消保护你的应用程序快照
LaunchScreenSnapshot.unprotect()
高级使用方法
共享实例
let launchScreenSnapshot = LaunchScreenSnapshot.shared
自定义构建
let launchScreenSnapshot = LaunchScreenSnapshot(application: UIApplication, notificationCenter: NotificationCenter, bundle: Bundle)
提供的参数
let restoreAnimationOptions = LaunchScreenSnapshot.Animation(duration: TimeInterval, delay: TimeInterval, dampingRatio: CGFloat, velocity: CGFloat, options: UIViewAnimationOptions)
launchScreenSnapshot.protect(with: UIView?, trigger: LaunchScreenSnapshot.Trigger, animation: restoreAnimationOptions, force: Bool)
等。
- 欢迎作出贡献。
- 归功于(让我们传播这个消息!),但并非强制。
作者
授权
LaunchScreenSnapshot 在 MIT 许可下可用。查看 LICENSE 文件以获取更多信息。