如何将启动画面或初始视图添加到Xcode iPhone实用程序模板 [英] How to Add a Splash Screen or Initial View to the Xcode iPhone Utility Template

查看:114
本文介绍了如何将启动画面或初始视图添加到Xcode iPhone实用程序模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我使用实用程序模板创建了一个应用程序。

  2. 我想在应用程序启动时再添加一个视图(如启动画面)。 / li>
  3. 在这个视图中,我有三个按钮。当我按下三个按钮之一时,实用模板的主视图将被加载。

请尽可能发送密码帮助我..谢谢提前

Please help me if possible send code..thanks in advance

推荐答案

启动画面和初始视图是两个完全独立的结构。

A splash screen and an initial view are two entirely separate constructs.

启动画面是一个没有活动UI的简单图像。您可以通过将名为default.png的图像文件放入资源来创建启动画面。应用程序将在启动任何视图加载之前自动显示该应用程序。 Apple人机界面指南说尽可能避免使用闪屏。它们的正确用途是通过呈现UI的图像来创建应用程序比它具有更快启动的错觉,以便用户可以开始自我定位。当用户阅读界面并转到触摸屏幕时,真实UI应该是活动的。

A splash screen is a simple image with no active UI. You create a splash screen by putting an image file named "default.png" into the resources. The app will automatically display that at startup before any views load. The Apple Human Interface Guidelines say to avoid the use of splash screens whenever possible. Their proper use is to create the illusion that the app has started more quickly than it has by presenting an image of the UI so the user can can begin to orient themselves. By the time the user reads the interface and goes to touch the screen, the real UI should be active.

您想要一个初始视图,而不是真正的闪屏。您实际上不需要使用实用程序模板。该模板配置为显示最简单的两个视图应用程序可能更多,您应该选择基于导航的项目。

You want an initial view, not a true splash screen. You don't really need to be using the utility template. That template is configured to show the simplest two view app possible anything more and you should select the navigation based project.

您可以通过将初始视图添加为实用程序项目中导航控制器的根控制器来修改现有项目。导航控制器上的Apple文档有示例代码,向您展示如何执行此操作。

You can modify your existing project by adding you initial view as the rootcontroller of the navigation controller in the utilities project. The Apple documents on the navigation controller have sample code to show you how to do this.

这篇关于如何将启动画面或初始视图添加到Xcode iPhone实用程序模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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