希望每次在iPhone中启动应用程序时更改启动屏幕 [英] Want to change splash screen every time the app launches in iphone

查看:85
本文介绍了希望每次在iPhone中启动应用程序时更改启动屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,在该应用程序中,我需要在每次启动时更改启动屏幕.

I am having an app in which I have a requirement of changing the splash screen every time when the app launches.

我有5张图片,我想在用户每次启动该应用程序时将我的启动屏幕更改为5张图片之一.

I am having 5 images and i want to change my splash screen by one of the 5 images every time user launches the app.

有可能这样做吗?

推荐答案

您无法更改加载应用时显示的初始屏幕(启动应用时会放大),但是您可以做一些事情通用(例如纹理或纯色),然后作为应用程序中的第一个视图控制器,您可以加载完全相同的图像(或仅使用纯色背景色),然后可以淡入五个图像中的一个并显示过渡到应用程序的第一个(实际)屏幕之前一小段时间.

You can't change the splash-screen that shows while your app is loading (that scales up when your app is launched), but you can make it something generic (like a texture or solid colour) then as the first view controller in the app you can load the exact same image (or just use a solid background colour), then you can fade-in one of your five images and show that for a short period before transitioning to the first (real) screen of your app.

例如:

  1. 飞溅为纯黑色.
  2. 将根视图控制器设置为具有纯黑色背景色的视图以及包含五个图像之一的图像视图,其中alpha设置为0.
  3. 淡入所选图像.
  4. 转换到应用的第一屏幕.

通过使第一个视图控制器看起来完全像初始屏幕一样,剪切过渡是无缝的,并且可以开始自定义过渡到应用内初始屏幕.

By making the first view controller look exactly like the splash screen (initially) the cut-transition is seamless and your custom transition to your in-app splash screen can begin.

这篇关于希望每次在iPhone中启动应用程序时更改启动屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆