---
title: Splashscreen
description: Control the splash screen for your app.
---
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
|AppVeyor|Travis CI|
|:-:|:-:|
|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-splashscreen?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-splashscreen)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-splashscreen.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-splashscreen)|
# cordova-plugin-splashscreen
This plugin is required to work with splash screens. This plugin displays and hides a splash screen during application launch.
Report issues with this plugin on the [Apache Cordova issue tracker][Apache Cordova issue tracker].
## Installation
// npm hosted (new) id
cordova plugin add cordova-plugin-splashscreen
// you may also install directly from this repo
cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git
## Supported Platforms
- Amazon Fire OS
- Android
- BlackBerry 10
- iOS
- Windows Phone 7 and 8
- Windows (`cordova-windows` version >= 4.4.0 is required)
- Browser
__Note__: Extended splashscreen does not require the plugin on Windows (as opposed to Android and iOS) in case you don't use the plugin API, i.e. programmatic hide/show.
### iOS-specific information
There are two mechanisms for displaying a launch screen on iOS:
1. Legacy launch images: images are sized exactly for the device's screen size. Does not support the iPad Pro 12.9's native resolution or split-screen/slide-over multitasking.
2. Launch storyboard images: Images are sized based on scale, idiom, and size classes. Supports all devices, and can be used with split-screen/slide-over multitasking.
Apple is moving away from legacy launch images. There is no official support for providing a native-resolution launch image for the iPad Pro 12.9 or for providing launch images that work with split-screen multitasking or slide-over. If your app doesn't need to support these contexts, then you can continue to use legacy launch images for as long as you like.
The preferred method of providing launch images is to use a launch storyboard. For native app developers, the ideal launch storyboard is an unpopulated version of the app's user interface at launch. For non-native app developers who don't wish to learn Interface Builder, however, this plugin simulates the legacy launch image method as much as is feasible.
#### Legacy launch images
If you choose to use legacy launch images, you will use the following syntax in `config.xml`:
```
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
<splash src="res/screen/ios/Default@2x~iphone.png" width="640" height="960"/>
<splash src="res/screen/ios/Default-Portrait~ipad.png" width="768" height="1024"/>
<splash src="res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" height="2048"/>
<splash src="res/screen/ios/Default-Landscape~ipad.png" width="1024" height="768"/>
<splash src="res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" height="1536"/>
<splash src="res/screen/ios/Default-568h@2x~iphone.png" width="640" height="1136"/>
<splash src="res/screen/ios/Default-667h.png" width="750" height="1334"/>
<splash src="res/screen/ios/Default-736h.png" width="1242" height="2208"/>
```
Technically the filename for the `src` attribute can be anything you want; the filenames are used because they match what will be used when your project is compiled. The width and height attributes determine which launch images are displayed on which devices as follows:
| width | height | device (orientation) |
|:-----------:|:------------:|:--------------------------------:|
| 320 | 480 | All non-retina iPhones and iPods |
| 640 | 960 | iPhone 4/4s (portrait) |
| 640 | 1136 | iPhone 5/5s/SE (portrait) |
| 750 | 1334 | iPhone 6/6s/7 (portrait) |
| 1242 | 2208 | iPhone 6+/6s+/7+ (portrait) |
| 2208 | 1242 | iPhone 6+/6s+/7+ (landscape) |
| 768 | 1024 | All non-retina iPads (portrait) |
| 1024 | 768 | All non-retina iPads (landscape) |
| 1536 | 2048 | All retina iPads (portrait) |
| 2048 | 1536 | All retina iPads (landscape) |
Note: It is vitally important that the source image actually matches the size specified in the `width` and `height` attributes. If it does not, the device may fail to render it properly, if at all.
#### Launch storyboard images
In order to support newer form factors and split-screen/slide-over multitasking, you should use launch storyboard images. These are similar to the legacy launch images above, but there are crucial differences:
- images are not specific to a given device.
- images are scaled to fill the available viewport (while maintaining the aspect ratio).
- the outer edges of the images will be cropped, and the amount will vary based on device an viewport.
- there is no need to provide an image for each possible device, viewport, and orientation; iOS will choose the best image for the situation automatically.
##### Designing launch storyboard images
The key to designing a launch storyboard image is understanding that the edges of the image will almost certainly be cropped. Therefore, one should not place any important information near the edges of any images provided to the launch storyboard. Only the center is a safe area, and this all but guarantees that following Apple's advice of presenting an unpopulated user interface will not work well.
Instead, the following tips should enable you to create a launch image that works across a multitude of form factors, viewports, and orientations:
- Important graphics (logos, icons, titles) should be centered. The safe bounding region will vary, so you will need to test to ensure that the important graphics are never cropped. Better yet, don't supply any important graphics in the first place.
- You _can_ fine-tune the placement and size of these graphics, but you don't have the same fine-grained control as you did with legacy launch images.
- Use a simple color wash. If you use two colors, you'll want one color to fill the top half of the image, and the second to fill the bottom half. If you use a gradient, you'll probably want to ensure that the middle of the gradient lines up with the center of the image.
- Don't worry about pixel perfection -- because the images are scaled, there's almost no chance the images will be perfectly fit to the pixel grid. Since all supported iOS devices use retina screens, users will be hard pressed to notice it anyway.
It is important to understand the concept of scale, idiom, and size class traits in order to use launch storyboard images effectively. Of the images supplied to the launch storyboard, iOS will choose the image that best matches the device and viewport and render that image. It is possible to supply o
没有合适的资源?快使用搜索试试~ 我知道了~
LeaRun V6.1.6.2
共2000个文件
js:1113个
gif:776个
cs:684个
5星 · 超过95%的资源 需积分: 49 77 下载量 95 浏览量
2018-11-06
15:25:56
上传
评论 5
收藏 139.93MB ZIP 举报
温馨提示
LeaRun V6.1.6.2版本,仅供学习研究用,不得用于商业用途。谢谢配合。
资源推荐
资源详情
资源评论
收起资源包目录
LeaRun V6.1.6.2 (2000个子文件)
android_sdk_version 1KB
Global.asax 114B
AUTHORS 332B
list-started-emulators.bat 1KB
list-emulator-images.bat 1KB
install-emulator.bat 1KB
start-emulator.bat 1KB
install-device.bat 1KB
list-devices.bat 1KB
check_reqs.bat 1021B
version.bat 1015B
build.bat 1010B
clean.bat 1010B
log.bat 1006B
run.bat 1006B
range.bnf 629B
iTunes-small.bplist 24KB
utf16.bplist 1KB
sample1.bplist 605B
sample2.bplist 384B
uid.bplist 365B
airplay.bplist 341B
int64.bplist 84B
build 2KB
DesignTimeResolveAssemblyReferencesInput.cache 309KB
DesignTimeResolveAssemblyReferencesInput.cache 20KB
DesignTimeResolveAssemblyReferencesInput.cache 18KB
DesignTimeResolveAssemblyReferencesInput.cache 17KB
DesignTimeResolveAssemblyReferencesInput.cache 16KB
DesignTimeResolveAssemblyReferencesInput.cache 15KB
DesignTimeResolveAssemblyReferencesInput.cache 14KB
DesignTimeResolveAssemblyReferencesInput.cache 14KB
DesignTimeResolveAssemblyReferencesInput.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 9KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 8KB
DesignTimeResolveAssemblyReferencesInput.cache 7KB
DesignTimeResolveAssemblyReferencesInput.cache 7KB
changelog 496B
CHANGES 5KB
CHANGES 5KB
check_reqs 1KB
力软敏捷开发框架开发手册.chm 1.53MB
ReadProperties.class 3KB
clean 2KB
applicationhost.config 84KB
App.config 13KB
App.config 12KB
App.config 9KB
Web.config 7KB
log4net.config 5KB
log4net.config 5KB
App.config 5KB
Web.config 4KB
system.config 3KB
system.config 3KB
App.config 3KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
web.config 2KB
Web.config 2KB
packages.config 2KB
App.config 1KB
App.config 1KB
Web.Release.config 1KB
Web.Release.config 1KB
database.config 1KB
Web.Debug.config 1KB
packages.config 1KB
Web.Debug.config 1KB
ioc.config 1KB
packages.config 1KB
App.config 910B
App.config 910B
packages.config 781B
packages.config 779B
ioc.config 777B
App.config 718B
app.config 668B
redis.config 446B
redis.config 444B
packages.config 437B
database.config 437B
packages.config 408B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- 软件工人2019-10-06不错,很有帮助
- qq_289270472019-12-22不错,可以研究学习
- qq_7937394642019-11-13初始登陆超级管理员的用户名密码是多少哇?麻烦告知,数据库里都是加密的。
yuligang1234
- 粉丝: 3
- 资源: 35
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功