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.

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

推荐阅读更多精彩内容