iOS 8人机交互指南(13)

前一篇:iOS 8人机交互指南(12)

13. 与 iOS 融为一体(Integrating with iOS)

Integrating with iOS means giving users a compelling, delightful experience that feels at home on the platform; it doesn’t mean creating an app that looks like a copy of a built-in app.

The best way to integrate your unique app with the platform is to understand the themes that motivate iOS—these are described in Designing for iOS—and figure out how your app should express them. As you do this, follow the guidelines in this section to help you give users the experience they expect.

与 iOS 融为一体意味着提供给用户一个引人入胜的美好体验,使用户在 iOS 上轻松自在;但它并不意味着要照葫芦画瓢地模仿内置 app。

将你独一无二的 app 与 iOS 平台融合的最好方式是理解使 iOS 成为 iOS 的主旨,也就是本章 Designing for iOS 中所描述的那些内容,其中指出了你创建的 app 应当如何表现。遵循这部分的指南可以帮你给予用户他们期待的体验。

13.1 正确使用标准 UI 元素(Use Standard UI Elements Correctly)

As much as possible, it’s a good idea to use the standard UI elements that UIKit provides. When you use standard elements instead of creating custom ones, both you and your users benefit:

(1)Standard UI elements automatically receive updates if iOS introduces a redesigned appearance—custom elements don’t get updated.

(2)Standard UI elements tend to offer various ways to customize their appearance or behavior. For example, all views (that is, objects that inherit from UIView) can be tinted using the tintColor property, which makes it easy to add color to your app.

(3)People are comfortable with the standard UI elements, so they instantly understand how to use them in your app.

最好尽可能使用 UIKit 提供的 UI 标准元素。当你使用标准元素而不是创建自定义元素时,你和你的用户都会受益:

(1)标准 UI 元素会随着 iOS 的重设计而自动升级,自定义元素则不行。

(2)标准 UI 元素倾向于提供多种方式来自定义它们的外观和行为。例如,所有视图(继承自 UIView 的对象)可以使用 tintColor 属性来染色,这使得向应用中添加颜色变得容易。

(3)人们习惯于标准 UI 元素,他们能够立即理解如何在 app 中使用这些元素。

To take advantage of the benefits of using standard UI elements, it’s crucial that you:

Follow the guidelines for every UI element. When a UI element looks and works the way people expect it to, they can depend on their prior experience to help them use it in your app. You can find UI element guidelines in BarsContent ViewsControls, and Temporary Views.

Don’t mix UI element styles from different versions of iOS. You don’t want to confuse users by displaying UI elements that look like they belong in a different version of iOS than the version that’s currently running on the device.

In general, avoid creating a custom UI element that performs a standard action. First, ask yourself why you’re creating a custom UI element that behaves exactly like a standard one. If you just want a custom look, consider changing the look of a standard element by using the UIKit appearance customization APIs or tint color. If you want a slightly different behavior, be sure to find out whether a standard element might do what you want when you adjust its properties and attributes. If you need completely custom behavior, it’s best to design a custom element that doesn’t look too similar to the standard ones.

充分发挥使用标准 UI 元素的好处,有几点需要注意:

遵循指南中提及的方法来使用每一个 UI 元素。当 UI 元素操作行为所见即所得时,用户可以依靠他们的先验知识来更好地使用你的 app。UI 元素指南可以参见 BarsContent ViewsControls 和 Temporary Views

不要混淆不同 iOS 版本下的 UI 元素样式。你一定不希望因为 UI 元素看上去不像他们正在使用的 iOS 版本却像另一个不同的版本而使用户感到困惑。

一般情况,不要创建一个与标准行为相同的自定义 UI 元素。首先,扪心自问为什么要创建一个自定义 UI 元素却有着标准元素的行为。如果你只是想看上去不同,那可以考虑使用 UIKit 外观自定义 API 或染色来改变标准元素的样式。如果你想要一个稍有不同的行为,那一定要确保调整标准元素的属性也不能满足需求。如果需要完全自定义的行为,那最好设计一个彻底的自定义元素,不要和标准元素太相似。

TIP

Interface Builder makes it easy to get the standard UI elements, use the appearance customization APIs, access properties and attributes, and apply custom and system provided icons to your controls. To learn more about Interface Builder, see Xcode Overview.

提示

接口构建器(Interface Builder)使获得标准 UI 元素变得容易,使用外观自定义 API,访问属性,对控件应用自定义和系统提供的图标。了解接口构建器的更多信息,可以查看 Xcode Overview

Don’t use system-defined buttons and icons to mean something else. iOS provides many buttons and icons that you can use in your app. Be sure you understand the documented, semantic meaning of these buttons and icons; don’t rely on your interpretation of their appearance. (You can find the meaning of each icon in Toolbar and Navigation Bar Buttons and Tab Bar Icons.)

If you can’t find a system-provided button or icon that has the appropriate meaning for a function in your app, you can create your own. For some guidelines to help you design custom icons, see Bar Button Icons.

不要使用系统定义的按钮或图标来表达其他含义。iOS 提供许多按钮和图标供你在 app 中使用。务必准确理解这些按钮和图标的含义,不要仅凭外观推断。(在 Toolbar and Navigation Bar Buttons 和 Tab Bar Icons 中可以了解每个图标的含义)

如果发现系统提供的按钮或图标无法恰当地表达 app 中的功能,那就可以自定义。更多信息详见 Bar Button Icons

If your app enables an immersive task or experience, it may be reasonable to create completely custom controls. This is because you’re creating a unique environment, and discovering how to control that environment is an experience users expect in such apps.

如果你的 app 需要完成一个拟真的任务或经历,那可能创建一个完全自定义的控件更加合理。这是因为你正在创建一个独一无二的环境,而发现如何控制环境本身也是一种用户体验。

13.2 淡化对文件和文档的处理(Downplay File and Document Handling)

iOS apps can help people create and manipulate files, but this doesn’t mean that people should have to think about the file system on an iOS device.

iOS app 能够帮助人们创建和操作文件,但是这不意味着用户需要考虑 iOS 设备的文件系统。

If your app helps people create and edit documents, it works well to provide some sort of app-specific document library view that lets them open an existing document or create a new one. Ideally, such a library view:

(1)Is highly graphical. People should be able to easily identify the document they want by looking at visual representations of the documents onscreen.

(2)Lets people make the fewest possible gestures to do what they want. For example, people might scroll horizontally through a carousel or grid of existing documents and open the desired one with a tap.

(3)Includes a new document function. Instead of making people go somewhere else to create a new document, a document library might let them tap a placeholder image to create a new document.

如果你的 app 帮助用户创建并编辑文档,那提供某种类型的文档库视图会比较好,这样让用户可以打开一个已有文件或者创建一个新文件。理想情况下,是这样一个库视图:

(1)高度图形化。用户应该能够通过屏幕上文档的可视化展示轻易找出他们希望操作的文档。

(2)让用户采用最少的步骤就能完成想做的操作。例如用户可以水平滚动已有文档的轮播或网格视图,然后点击打开某个文件。

(3)包含新建文档功能。不要让用户去其他地方寻找该如何新建文档,文档库可以让用户点击占位符图片就轻松创建一个新文档。

For example, Pages displays the user’s documents, along with an easy way to create new documents, in a graphical library view.

例如,Pages 显示用户文档,同时在图形化的库视图中提供一个简单的方式创建新文档。

Pages

TIP

You can use the Quick Look Preview feature to let people preview documents within your app, even if your app can’t open them. To learn how to provide this feature in your app, see Quick Look.

提示

你可以使用快速查看预览(Quick Look Preview)功能来让用户在 app 中预览文档,即使你的 app 无法打开它们。了解更多该功能相关信息,参见 Quick Look

If your app lets people use documents that they created in other apps, you can display a modal document picker view controller to help them access these documents. The document picker view controller can display documents in the user’s iCloud Drive in addition to Document Provider extensions, which are associated with other document-creation or document-storage apps. To learn more about Document Provider extensions, see Document Provider Extensions; to learn more about the document picker view controller, see Document Picker Programming Guide.

如果你的 app 让用户使用他们在其他 app 中创建的文档,你可以显示一个模态文档拾取视图控制器(document picker view controller)来访问这些文档。文档拾取视图控制器能显示用户 iCloud Drive 中的文档以及文档提供(Document Provider)扩展。文档提供扩展与其他应用创建的文档或文档存储 app 相关。了解更多关于文档提供扩展,可以查看 Document Provider Extensions;了解更多关于文档拾取视图控制器,可以查看 Document Picker Programming Guide

Give people confidence that their work is always preserved unless they explicitly cancel or delete it. If your app helps people create and edit documents, don’t require them to take an explicit save action. iOS apps should take responsibility for saving people’s input, both periodically and when they open a different document or switch away from the app.

要让用户相信他们的操作总是得以妥善保留,除非显式地取消或删除。如果你的 app 帮助用户创建并编辑文档,那不要让用户采用显式的保存动作。iOS 应用应当随时保存用户输入,不管是定期保存还是在用户打开其他文档或切换至其他应用时的立即保存。

If the main function of your app isn’t content creation—but you allow people to switch between viewing information and editing it—it can make sense to ask them to save their changes. In this scenario, it often works well to provide an Edit button in the view that displays the information. When people tap the Edit button, replace it with a Save button and add a Cancel button. The transformation of the Edit button helps remind people that they’re in an editing mode and might need to save changes, and the Cancel button gives them the opportunity to exit without saving their changes.

如果 app 主要功能不是创建内容——但你允许用户在查看信息和编辑信息间切换——此时询问用户是否保存修改就是有意义的了。在这种情况下,最好在显示信息的视图中提供一个编辑按钮。当用户点击编辑按钮,将编辑按钮变为保存按钮,并增加一个取消按钮。这种编辑按钮的转变帮助提醒用户他们处于编辑态,并需要保存修改,而取消按钮则让用户可以不保存退出。

13.3 必要时支持可配置(Be Configurable If Necessary)

Some apps might need to give users a way to make setup or configuration choices, but most apps can avoid or delay doing this. Successful apps work well for most people right away, while also offering some convenient ways to adjust the user experience.

When you design your app to function the way most of your users expect, you decrease the need for settings. If you need information about the user, query the system for it instead of asking users to provide it. If you decide you must provide app settings that users rarely need to change, see The Settings Bundle to learn how to support them in your code.

有些 app 可能需要为用户提供一种渠道来设置或配置某些选项,但大部分 app 应该避免或推迟这样做。成功的 app 应该能够立即为大部分人所用,与此同时也提供一些方便的方式来调整用户体验。

当你按照大部分用户期待的方式设计 app 时,你就降低了对设置的需求。如果你需要用户信息,可以从系统中查询而不是让用户提供。如果你决定一定要提供用户很少需要改变的 app 设置,参见 The Settings Bundle 来学习如何在代码中支持。

As much as possible, offer configuration options in the main UI. Putting options in the main UI can make sense if the options represent a primary task and if people might want to change them frequently. If people are likely to change an app’s configuration only occasionally, it can make sense to put them in a separate view.

If necessary, help users go directly to your app’s settings in Settings. In particular, if you display a message that describes where to find your settings, such as “Go to Settings > MyApp > Privacy > Location Services,” replace the description with a button that opens that location in Settings. To learn how to enable this behavior, see Settings Launch URL.

尽可能在主要的 UI 中提供配置项。如果选项代表一个基础任务或者用户可能会经常修改,那么将选项放在主要的 UI 中很有意义。如果用户很可能只是偶尔修改 app 配置,那把它们放在单独的视图中比较好。

如有可能,帮助用户直达设置中的对应应用设置。尤其是,如果你显示了一个消息来描述如何找到设置,例如“前往设置》我的应用》隐私》定位服务”,那还不如为这段描述增加一个按钮,点击按钮即可打开设置中的对应位置。了解更多内容参见 Settings Launch URL

13.4 充分利用 iOS 技术(Take Advantage of iOS Technologies)

iOS provides a wealth of technologies that support common tasks and scenarios in ways that users expect. This expectation means that it’s almost always better to integrate system-supported technologies into your app than it is to design a custom approach.

Some iOS technologies—such as Multitasking and VoiceOver—are system features that all apps should incorporate. Others enable specific app functionality, such as handling tickets and gift cards (Passbook), enabling user purchases within an app (In-App Purchase), displaying in-app advertising (iAd Rich Media Ads), integrating with Game Center, and supporting iCloud.

iOS 按照用户期望的样子提供丰富的技术来支持常见任务和场景。这意味着将系统支持的技术融合到你自己的 app 中几乎总是优于采用自定义的方法。

某些 iOS 技术——例如多任务和语音——是所有 app 应该配合的系统特性。其他还有一些技术,使 app 具有特殊功能,例如处理票据和礼物卡(Passbook),使用户在 app 中购买(In-App Purchase),显示应用内广告(iAd Rich Media Ads),集成到游戏中心(Game Center),以及支持 iCloud。

英文原文链接

后一篇:iOS 8人机交互指南(14)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 204,053评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,527评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,779评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,685评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,699评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,609评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,989评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,654评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,890评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,634评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,716评论 1 330
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,394评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,976评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,950评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,191评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,849评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,458评论 2 342

推荐阅读更多精彩内容