4. 啟動(dòng)與停止(Starting and Stopping)
4.1 立即啟動(dòng)(Start Instantly)
It’s often said that people spend no more than a minute or two evaluating a new app. When you make the most of this brief period by presenting useful content immediately, you pique the interest of new users and give all users a superior experience.
據(jù)說,人們評價(jià)一款新 app,用時(shí)不會超過1、2分鐘衰齐。當(dāng)你充分利用這短暫的時(shí)間來立即展示有用內(nèi)容時(shí)已维,你就會吸引新用戶的興趣主巍,同時(shí)帶給所有用戶較好的體驗(yàn)险耀。
IMPORTANT
Don’t tell people to reboot or restart their devices after installing your app. Restarting takes time and can make your app seem unreliable and hard to use.
If your app has memory-usage or other issues that make it difficult to run unless the system has just booted, you need to address those issues. For some guidance on developing a well-tuned app, see?Use Memory Efficiently.
注意:不要讓用戶在安裝 app 后重啟他們的設(shè)備案怯。重啟花費(fèi)時(shí)間琳袄,也使 app 看上去不可信賴江场、很難用。
如果 app 需要使用內(nèi)存或者不重啟系統(tǒng)就很難運(yùn)行窖逗,那就需要明確說明這些事宜址否。關(guān)于開發(fā)一款調(diào)整好的 app 有一些指南,參見 Use Memory Efficiently碎紊。
As much as possible, avoid displaying a splash screen or other startup experience. It’s best when users can begin using your app immediately.
盡可能避免顯示啟動(dòng)界面或其他啟動(dòng)體驗(yàn)佑附。最好用戶能對 app 快速上手。
Avoid asking people to supply setup information.?Instead:
Focus on the needs of 80 percent of your users.?When you do this, most people won’t have to supply any settings, because the app is already set up to behave the way they expect. If there is functionality that only a few users might want—or that most users might want only once—leave it out.
Get as much information as possible from other sources.?If you can use any of the information people supply in built-in app or device settings, query the system for these values; don’t ask people to enter them again.
If you must ask for setup information, prompt people to enter it within your app.?Then, store this information as soon as possible (potentially, in your app’s settings). This way, people aren’t forced to switch to Settings before they get the chance to enjoy your app. If people need to make changes to this information later, they can go to the app’s settings at any time.
不要讓用戶提供設(shè)置信息仗考。應(yīng)該:
聚焦于 80% 的用戶的需求音同。這樣做的話,大部分人不必提供任何設(shè)置秃嗜,因?yàn)?app 已經(jīng)按照他們的預(yù)期進(jìn)行了設(shè)置权均。對那些極少數(shù)用戶可能需要的功能或者大部分用戶可能只需要一次的功能,就別理會了锅锨。
通過其他渠道獲取盡可能多的信息叽赊。如果可以復(fù)用用戶在內(nèi)置 app 或設(shè)備設(shè)置里提供的信息,那就向系統(tǒng)查詢這些數(shù)據(jù)必搞,不要再讓用戶輸入了必指。
如果必須詢問設(shè)置信息,提示人們在 app 內(nèi)輸入恕洲。然后盡快存儲這一信息(可能在 app 設(shè)置里)塔橡。這樣用戶在使用 app 前無需切換到設(shè)置界面梅割。如果用戶需要稍后修改這些信息,他們可以隨時(shí)訪問 app 的設(shè)置谱邪。
Delay a login requirement for as long as possible.?It’s best when users can navigate through much of your app and use some of its functionality without logging in. For example, App Store doesn’t ask users to log in until they decide to buy something. Users often abandon apps that force them to log in before they can do anything useful.
If users must log in, display in the login view a brief, friendly explanation that describes the reasons for the requirement and how it benefits users.
盡量延后登錄需求炮捧。最好用戶不登錄就可以瀏覽 app 的大部分界面、使用部分功能惦银。例如, App Store 不要求用戶登錄末誓,除非他們決定購買東西扯俱。對那些強(qiáng)制要求登錄的 app,用戶通常什么都沒做就放棄了喇澡。
如果用戶必須登錄迅栅,那就在登錄界面顯示一個(gè)簡短、友好的解釋晴玖,說明必須登錄的理由以及對用戶有何好處读存。
Think carefully before providing an onboarding experience.?(Onboarding introduces an app’s features and explains how to perform common tasks.) Before you consider onboarding, make every effort to design your app so that all its features and tasks are intuitive and easily discoverable.?Onboarding is not a substitute for good app design. If you still feel that onboarding is necessary, follow these guidelines to create a brief, targeted experience that doesn’t get in the user’s way.
提供新手引導(dǎo)前要仔細(xì)思考。(新手引導(dǎo)介紹了 app 的功能呕屎,并解釋了如何完成常見任務(wù)让簿。)在考慮新手引導(dǎo)之前,努力設(shè)計(jì) app 使得所有功能和任務(wù)都可憑直覺使用秀睛、易于發(fā)現(xiàn)尔当。新手引導(dǎo)不是好 app 設(shè)計(jì)的替代。如果你仍然感覺新手引導(dǎo)是必要的蹂安,那就遵循如下指南來創(chuàng)建一個(gè)簡短椭迎、目標(biāo)明確的引導(dǎo)。
Give users only the information they need to get started.?A good onboarding experience shows users what to do first or briefly demonstrates a few of the features that most users are interested in. If you give too much information to users before they have a chance to explore your app, you make users responsible for remembering details they don't need right away and you may send the message that your app is hard to use. If additional help is needed for specific tasks, provide that help only when the user is performing those tasks.
Use animation and interactivity to engage users and help them learn by doing.?Add text sparingly and only if it enriches the experience; don’t expect users to read long passages. For example, don’t describe how to perform a simple task when you can use animation to show users what to do. To lead users through a more complex task, you might add transient overlay views that briefly describe each step as the user is about to do it. As much as possible, avoid displaying screenshots of your app because they’re not interactive and users can confuse them with app UI.
Make it easy to dismiss or skip the onboarding experience.?After users have viewed the onboarding experience, they probably don’t want to view it again; other users may not want to view it at all. Be sure to remember the choice users make and don’t force them to make it every time they open your app.
只給用戶開始使用 app 必要的信息田盈。一個(gè)好的新手引導(dǎo)展示給用戶首先需要做的畜号、或者簡短演示大部分用戶都感興趣的一些功能。如果在用戶使用 app 前提供太多信息允瞧,會讓用戶覺得有必要立即記住那些他們不需要的細(xì)節(jié)简软,而且顯得 app 很難用。如果特殊任務(wù)需要額外幫助瓷式,那么在用戶進(jìn)行這些任務(wù)時(shí)再提供替饿。
使用動(dòng)畫和交互來鼓勵(lì)用戶、幫助他們學(xué)會使用贸典。只在確實(shí)必要時(shí)视卢,加入少量文字;不要期待用戶會讀長篇大論廊驼。例如据过,當(dāng)可以使用動(dòng)畫來為用戶展示如何進(jìn)行一個(gè)簡單任務(wù)時(shí)惋砂,不要文字描述。為了引導(dǎo)用戶完成一個(gè)更復(fù)雜的任務(wù)绳锅,可以增加臨時(shí)覆蓋視圖來簡短描述用戶將要操作的每一步西饵。盡可能避免顯示 app 的屏幕截圖,因?yàn)樗鼈儾痪呖山换バ粤圮剑脩粢矔械矫曰蟆?/p>
讓跳過新手引導(dǎo)很容易眷柔。當(dāng)用戶看過新手引導(dǎo)后,他們很可能不想再看一遍原朝;其他用戶也根本不想看驯嘱。確保記住用戶的選擇,不要迫使他們每次打開 app 時(shí)都要操作一次新手引導(dǎo)喳坠。
Avoid asking users to rate your app too soon.?Asking for a rating too soon tends to annoy users and may decrease the amount of useful feedback you receive. To encourage well-considered feedback, be sure to give users a chance to form an opinion about your app before you ask them to rate it. For example, you might wait until users have visited a minimum number of different screens or performed a minimum number of tasks.
In general, launch in the device’s current orientation.?However, if your app runs in?only?one orientation, you should always launch in that orientation and let users rotate the device if necessary. For example, if a game or media-viewing app runs in landscape only, it’s appropriate to launch the app in landscape, even when the device is currently in portrait. This way, if people start the app while the device is in portrait, they know to rotate the device to landscape to view the content.
不要過早讓用戶給 app 打分鞠评。過早要求打分會讓用戶覺得很煩,從而減少收到的有用反饋總量壕鹉。為了鼓勵(lì)經(jīng)過良好思考過的反饋剃幌,一定要給用戶機(jī)會在被要求打分前對 app 形成一個(gè)完整認(rèn)識。例如晾浴,可以等到用戶已經(jīng)訪問過一些不同的界面或者完成了一些任務(wù)之后再要求評分负乡。
通常,會按照設(shè)備當(dāng)前的方向進(jìn)行啟動(dòng)怠肋。然而敬鬓,如果 app 只在某一個(gè)方向上運(yùn)行,那就應(yīng)該始終在該方向啟動(dòng)笙各,如有必要钉答,提醒用戶旋轉(zhuǎn)設(shè)備。例如杈抢,如果一個(gè)游戲或者可視多媒體只在橫屏運(yùn)行数尿,那橫屏?xí)r啟動(dòng) app 比較合適,即使當(dāng)前設(shè)備為豎屏惶楼。這樣右蹦,如果用戶在設(shè)備豎屏?xí)r啟動(dòng) app,他們也知道要旋轉(zhuǎn)設(shè)備到橫屏下來查看內(nèi)容歼捐。
NOTE
It’s best when a landscape-only app supports both variants of landscape orientation—that is, with the Home button on the right or on the left. If the device is already in landscape, a landscape-only app should launch in that variant, unless there’s a very good reason not to. Otherwise, launch a landscape-only app in the variant with the Home button on the right. (To learn more about supporting different device orientations, see?Adaptivity and Layout.)
注意:一個(gè)只能橫屏顯示的 app 最好能支持橫屏方向的所有變種何陆,即 Home 按鈕在右側(cè)和左側(cè)兩種情況。如果設(shè)備已經(jīng)是橫屏豹储,那么只能橫屏顯示的 app 應(yīng)該就在當(dāng)前的變種下顯示贷盲,除非有其他更好的理由不這樣。否則,在 Home 按鈕在右側(cè)這一情況下運(yùn)行只能橫屏顯示的 app巩剖。(為了更多了解支持不同設(shè)備方向的問題铝穷,詳見?Adaptivity and Layout)
Provide a launch file or image.?iOS displays a launch image the moment your app starts—giving users the impression that your app is fast and giving your app enough time to load content. Learn how to create a launch file or image in?Launch Images.
提供啟動(dòng)文件或圖片。iOS 在 app 開始的一瞬間顯示啟動(dòng)圖片佳魔,給用戶一種 app 啟動(dòng)很快的感覺曙聂,給 app 足夠的時(shí)間來加載內(nèi)容。在?Launch Images?學(xué)習(xí)如何創(chuàng)建啟動(dòng)文件或圖片鞠鲜。
If possible, avoid requiring users to read a disclaimer or agree to an end-user license agreement before they can do anything else.?Instead, you can let the App Store display your disclaimer or end-user license agreement (EULA) so that people can access it before they get your app. If you must provide these items within your app, be sure to integrate them in a way that harmonizes with your UI and balances business requirements with user experience needs.
When your app restarts, restore its state so users can continue where they left off.?People shouldn’t have to remember the steps they took to reach their previous location in your app. To learn more about efficient ways to preserve and restore your app’s state, see?Preserving Your App’s Visual Appearance Across Launches.
如有可能宁脊,不要要求用戶在還沒做任何事情之前就閱讀一份免責(zé)聲明或者同意一份終端用戶許可證協(xié)議。開發(fā)者可以讓 App Store 顯示免責(zé)聲明或者終端用戶許可證協(xié)議贤姆,這樣用戶可以在獲取 app 前訪問它朦佩。如果必須在 app 中提供這些條目,那就確保以一種與 app UI 和諧的方式集成它們庐氮,并且平衡商業(yè)需求與用戶體驗(yàn)需要。
當(dāng) app 重啟后宋彼,要恢復(fù)它之前的狀態(tài)弄砍,使得用戶可以在他們離開的地方繼續(xù)。人們不必記住他們之前在 app 操作的步驟和位置输涕。關(guān)于高效保存恢復(fù) app 狀態(tài)的方法音婶,可以參見Preserving Your App’s Visual Appearance Across Launches。
4.2 隨時(shí)準(zhǔn)備停止(Always Be Prepared to Stop)
An iOS app never displays a Close or Quit option.?People stop using an app when they switch to another app, return to the Home screen, or put their devices in sleep mode.
When people switch away from your app, iOS multitasking transitions it to the background and replaces its UI with the UI of the new app. To prepare for this situation, your app should:
Save user data as soon as possible and as often as reasonable.?Do this because an app in the background can be told to exit or terminate at any time.
Save the current state when stopping at the finest level of detail possible.?In this way, people don’t lose their context when they switch back to your app. For example, if your app displays scrolling data, save the current scroll position. You can learn more about efficient ways to preserve and restore your app’s state in?Preserving Your App’s Visual Appearance Across Launches.
iOS app 從不顯示關(guān)閉或退出選項(xiàng)莱坎。當(dāng)人們切換到其他 app衣式、返回主屏幕或讓設(shè)備進(jìn)入休眠模式時(shí),就停止使用 app檐什。
當(dāng)人們切換離開 app 時(shí)碴卧,iOS 多任務(wù)切換它至后臺,開始顯示新 app 的交互乃正。為這種情況做準(zhǔn)備住册,需要:
按照合理的頻率盡量保存用戶數(shù)據(jù)。因?yàn)楹笈_的 app 隨時(shí)可以退出或終止瓮具。
停止時(shí)要保存當(dāng)前狀態(tài)荧飞,盡可能注意細(xì)節(jié)。這樣名党,人們不會在切換回 app 時(shí)丟失他們的上下文叹阔。例如,如果 app 顯示數(shù)據(jù)時(shí)有滾動(dòng)條传睹,那就保存當(dāng)前滾動(dòng)條的位置耳幢。了解高效保存和恢復(fù) app 狀態(tài)的方法,可以參見?Preserving Your App’s Visual Appearance Across Launches蒋歌。
Some apps may need to keep running in the background while users run another app in the foreground. For example, users might want to keep listening to the song that’s playing in one app while they’re using a different app to check their to-do list or play a game. Learn how to handle multitasking correctly and gracefully in?Multitasking.
Never quit an iOS app programmatically.?People tend to interpret this as a crash. If something prevents your app from functioning as intended, you need to tell users about the situation and explain what they can do about it. Here are two good ways to do this:
一些 app 可能需要在其他 app 在前臺運(yùn)行時(shí)保持自己在后臺運(yùn)行帅掘。例如委煤,用戶可能想要在聽歌的同時(shí)使用另一個(gè)清單應(yīng)用或者玩游戲。學(xué)習(xí)如何正確優(yōu)雅地處理多任務(wù)可以參見?Multitasking修档。
從程序的角度碧绞,永遠(yuǎn)不要退出 iOS app。人們傾向于把這理解為崩潰吱窝。如果有東西阻止了 app 正常運(yùn)行讥邻,那就需要告知用戶當(dāng)前的情形,向他們解釋他們應(yīng)該做何種處理院峡。這里有兩個(gè)好方法:
If all app features are unavailable, display a screen that describes the situation and suggests a correction.?The information gives feedback to users and reassures them that there’s nothing wrong with your app. It also puts users in control, letting them decide whether they want to take corrective action and continue using your app or switch to another app.
如果 app 的所有功能都不可用兴使,那就顯示一個(gè)界面來描述情形并給出正確建議。這一信息給予用戶反饋照激,并使用戶安心发魄,了解到 app 并未出錯(cuò)。這也使用戶掌控一切俩垃,讓他們可以決定是否采取正確的行動(dòng)來繼續(xù)使用 app 還是切換到其他 app励幼。
If only some app features are unavailable, display either a screen or an alert when people try to use the feature.?Otherwise, people should be able to use the rest of the app. If you decide to use an alert, be sure to display it?only?when people try to access the feature that isn’t functioning.
如果 app 的一些功能不可用,那在人們試圖使用不可用的功能時(shí)口柳,要么顯示一個(gè)界面苹粟、要么顯示一個(gè)警告提示。否則跃闹,人們應(yīng)該可以使用 app 的其他部分嵌削。如果決定使用警告提示,那要確保只在用戶試圖訪問不可用的功能時(shí)才顯示望艺。