|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/ios-7-option-screens-for-uiview-or-sprite-kit-based-apps/
课程评论:没有评论
课程名称:iOS 7 选项屏幕设计(适用于 UIView 或 Sprite Kit 应用) 课程概述:本教程专注于创建应用程序中的设置或偏好屏幕,支持单视图应用程序(UIView 基于项目)或 Sprite Kit 基于项目。我们将学习如何创建 UISwitch、UIButton、UISlider、UISegmentedControl(包括类似分段控制的按钮组)以及 UIPickerView。我们将构建一个包含三列的选择器视图,数据将从属性列表文件中提取。每列分别代表关卡名称(如“海洋”、“恶劣地形”等)、游戏玩法模式(如“消灭 X 个敌人”、“收集 X 个硬币”或“赛跑计时”),以及一个用于调整每种游戏模式难度的数字参数(例如,可以增加“赛跑计时”模式的时间或增加需要击杀的敌人数量)。 我们将使这些轮子相互联动,例如,当你旋转第一个轮子选择关卡时,其余两个轮子的设置将根据属性列表中的默认设置进行调整。当调整中间轮子以更改游戏模式时,第三个轮子的数字范围也会自动不同(某些玩法可能适合小范围的数字,而另一些则可能需要较大的增量)。 所有数据存储在单例 AppData 类中,充当我们的偏好变量与其他类之间的桥梁。您将学习如何在 OptionScreen 类中测试所做的更改,并与主游戏或应用程序类相结合。教程系列中的源项目将在重要的断点处分阶段保存,并更新到补充材料标签中。您将获得 UIView 和 Sprite Kit 基于的项目示例,同时还会提供所需的图像资源。
In this tutorial, we will focus entirely on creating an Options or Preferences screen, using a Single View Application (or UIView based project) or Sprite Kit based project. We'll create UISwitches, UIButtons, UISliders, UISegmentedControls (and groups of buttons that act like segmented controls), and finally, a UIPickerView. Picker views can be made up of single or multiple columns of "spin-able" data (for example, Apple's Clock app has a Timer function made up of a double column UIPickerView). In our hypothetical project we will create a 3-column picker view which populates itself using data from a Property List file. This data is split into a column for the level name ("Ocean, Bad Lands, etc"), a column for the mode of game play ("Kill X" number of enemies, "Collect X" number of coins, or "Beat the Clock") and third column for a number parameter to tweak the difficulty of each game mode (for example, you could add more time to the "Beat the Clock" mode or add more enemies to kill). We will make the wheels interconnected as well. So if you spin the first wheel to set the level, it will change the other two wheels to default to the settings defined in the Property List for the level. If you spin the middle wheel to change the game mode, it will automatically change the third wheel to use a different range of numbers (one mode of play might be best with a small range like 1-15, but another might work better in increments of ten, like 60-300). All of our data is stored in a singleton AppData class, which serves as a go-between to use (or test) our preference variables with any other class. You'll see how to test any changes made in the OptionScreen class with the main game / app class. The source projects are saved in increments throughout the tutorial series, and uploaded in the Supplemental Materials tab at notable breakpoints. You'll get both UIView and Sprite Kit based projects. The images to use are included as well.