1 Star 0 Fork 0

internetwei / LLaunchScreen

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

LLaunchScreen

LLaunchScreen CI   License MIT   CocoaPods   Platform   Support   blog

自动修复iPhone启动图显示异常,1行代码修改启动图 建议使用OC版本,Swift版本后续将不再升级维护。

OC版本

特性

  • 自动修复启动图显示异常
  • 1行代码修改启动图
  • 兼容iOS13以下系统

Demo

动态修改启动图 修复启动图异常
demo.gif repair.gif

前提

由于Swift语言的限制,有些初始化操作需要您手动执行:

  1. 请在application(_ , didFinishLaunchingWithOptions :)方法返回前执行LLaunchScreen.finishLaunching()
  2. 请在修改启动图的逻辑前调用LLaunchScreen.backupSystemLaunchImage()

用法

// 将所有启动图恢复为默认启动图(Restore all launch screen to the initial state)
LLaunchScreen.restoreAsBefore()

// 替换指定类型启动图(Replace the specified type of launch Image)
LLaunchScreen.replaceLaunchImage(replaceImage: replaceImage, type: .verticalLight, quality: 0.8, validation: nil)

// 自定义暗黑系启动图的校验规则,请写在finishLaunching()方法前(Customize the verification rules of the dark style launch screen, Please write before finishLaunching() method)
LLaunchScreen.hasDarkImageBlock = {
    
}

// 获取指定模式下的本地启动图(Get the local launch screen diagram in the specified mode)
LLaunchScreen.launchImage(from: .verticalLight)

安装

CocoaPods

  1. 在 Podfile 中添加 pod 'LLaunchScreen'
  2. 执行 pod install --repo-update
  3. import LLaunchScreen

手动安装

  1. 下载LLaunchScreen文件夹内的所有内容
  2. LLaunchScreen文件夹添加(拖放)到你的工程

系统要求

该项目最低支持iOS9.0和Xcode10.0,如果想在更低系统上使用可以联系作者

注意点

  • 替换图片的尺寸建议和屏幕物理分辨率保持一致
  • APP更新版本后,第一次打开APP会显示默认启动图,这是系统限制,暂时没办法解决
  • 可以修改iPad启动图,但是并不完美,后续版本会适配

联系作者

如果你有更好的改进,please pull reqeust me

如果你有任何更好的意见,请创建一个Issue

可以通过此邮箱联系作者internetwei@foxmail.com

LLaunchScreen设计思路

待办事项

  • 完善iPad的启动图修复与替换
  • 支持Carthage

许可证

LLaunchScreen 使用 MIT 许可证,详情见 LICENSE 文件

Copyright (c) 2020 internetwei <internetwei@foxmail.com> 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.

简介

自动修复iPhone启动图显示异常,1行代码修改启动图。 展开 收起
Swift 等 2 种语言
MIT
取消

发行版 (2)

全部
Fix

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/internetWei/LLaunchScreen.git
git@gitee.com:internetWei/LLaunchScreen.git
internetWei
LLaunchScreen
LLaunchScreen
master

搜索帮助