iOS-HIG 系統能力-多任務

Multitasking

Multitasking lets you quickly switch from one app to another at any time through a multitasking interface on an iOS device, or by using a multifinger gesture on an iPad. On iPad, multitasking also lets you use two apps at once in Slide Over, Split View, or Picture in Picture mode. Slide Over is accessed by swiping from the right side of the screen to temporarily use a second app without leaving the context of the current app, such as to quickly view your Mail inbox while you’re using Safari. Split View lets you use two side-by-side apps at the same time, and Picture in Picture lets you watch a video while working in another app.

多任務允許你在一個iOS設備上通過一個多任務界面快速在應用間切換,或者使用多手指手勢在iPad。在iPad,多任務允許你一次使用兩個app在Slide Over, Split View, or Picture in Picture模式。Slide Over是從屏幕右邊滑動來暫時使用第二個app,而不用離開當前app的環境,例如在使用Safari的時候快速瀏覽你的郵箱。Split View允許你端對端同時使用兩個app,畫中畫允許你在使用另一個app時觀看視頻。

~~~假裝有圖,原文中有演示~~~原文鏈接

Designing an app that thrives in a multitasking environment hinges on your app harmoniously coexisting with other apps on the device. This means your app shouldn’t use too much CPU, memory, screen space, or other system resources. It should respond well to sudden interruptions and audio from other apps, transition to and from the background quickly and smoothly, and behave responsibly when operating in the background.

設計一個app可以和設備上的app和諧共處在多任務的環境下。這意味著你的app不應該使用太多CPU,內存,屏幕空間或者其他系統資源。它應該能及時響應來自其他app突然的打斷和語音,從后臺能流暢地轉換出來,當隱藏在后臺時表現得可響應操作。

Be prepared for interruptions, and be ready to resume.Your app can be interrupted at any time. When an interruption occurs, your app should save the current state quickly and precisely so people can seamlessly continue where they left off when they return. For developer guidance, seePreserving Your App’s Visual Appearance Across LaunchesinApp Programming Guide for iOS.

準備好被打斷,準備好恢復。你的app可以在任何時候被打斷。當一個打斷發生,你的app應該快速準確地保存當前狀態,這樣用戶回來時可以無縫在他們離開的地方繼續。For developer guidance, seePreserving Your App’s Visual Appearance Across LaunchesinApp Programming Guide for iOS.

Make sure your interface works with a double-high status bar.Certain features, such as in-progress phone calls, audio recording, and tethering display an additional status bar at the top of the screen. In unprepared apps, this added height can cause layout problems by covering or pushing down other interface elements. Test your app with these features enabled to ensure that your interface responds appropriately and still looks great.

確保你的界面能與double-high 狀態欄協作。一些特性,例如進行中的電話,語音錄音,共享播放一個額外的狀態欄在屏幕頂部。在沒準備好的app,這個增加的高度可能引起布局問題通過覆蓋或者擠壓下面的其他界面元素。測試你app和這些特性共存時,保證界面仍然看起來不錯。

Pause activity that requires attention or active participation.If your app is a game or a media-viewing app, for example, make sure people don’t miss anything when they switch to another app. When they switch back, let them continue as if they’d never left.

暫停要求關注的活動或者激活參與。如果你的app是一款游戲或者多媒體觀看app,例如,確保用戶在轉換到另一個app時不要丟失任何內容。當他們轉換回來,繼續好像他們從沒離開過。

Respond appropriately to external audio.Occasionally, your app’s audio may be interrupted by audio from another app or the system itself. For example, an incoming phone call or a music playlist initiated by Siri may interrupt your app’s audio. When situations like these occur, your app’s response should meet people’s expectations. For primary audio interruptions, such as playing music, podcasts, or audiobooks, your app should pause its audio indefinitely. For shorter interruptions, such as GPS directional notifications, your app should temporarily lower its audio volume or pause its audio and resume when the interruption ends. For additional guidance, seeAudio.

對額外的語音合適回應。有時,你的app語音會被另一個app的語音打斷或者系統本身。例如,一個來電或者一個由Siri啟動音樂播放列表也許會打斷你app語音。當發生這種情況時,你app響應應該滿足用戶期望。對于主要語音打斷,例如播放音樂,廣播或者有聲書,你的app應該無限暫停它的語音。對于短暫打斷,例如 GPS導航提示,你app應該短暫調低它的語音音量或者暫停它的語音,在打斷結束后恢復。For additional guidance, seeAudio.

Finish user-initiated tasks in the background.When someone starts a task, they expect it to finish even if they switch away from your app. If your app is in the middle of performing a task that doesn’t need additional input, complete it in the background before suspending.

在后臺完成用戶開始的任務。當某人開始一個任務,他們期望它能完成即使它們離開你的app。如果你的app在執行任務的中間,而且不需要額外輸入,在后臺完成它。

Use notifications sparingly.Your app can arrange for notifications to be sent at specific times, whether your app is suspended, running in the background, or not running at all. Notifications are fine for communicating important information, but avoid pestering people with too many. For example, don’t show a notification every time your app finishes a task in the background. Instead, let people check on tasks by returning to your app. For additional guidance, seeNotifications.

謹慎使用通知。你的app可以安排在特定時間發送通知,不論你的app是否展開,在后臺運行,或者完全沒有運行。通知是很好的溝通重要信息的方式,但是太多通知會煩惱用戶。例如,一個任務在后臺完成時不需要每次都顯示一個通知。取而代之,讓用戶回到你的app時檢查任務。For additional guidance, seeNotifications.

For iPad-specific developer guidance, seeAdopting Multitasking Enhancements on iPad.

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容