Modality creates focus by preventing people from doing other things until they complete a task or dismiss不予理會 a message or view. Action sheets, alerts, and activity views provide modal experiences. When a modal view appears onscreen, the user must make a choice by tapping a button or otherwise否則 exiting the modal experience. Some apps implement實施 modal views, such as while editing an event in Calendar or choosing a bookmark標記 in Safari. A modal view can occupy占據(jù) the entire screen, an entire parent view, such as a popover, or a portion部分 of the screen. A modal view typically代表性的 includes completion and cancel buttons that exit the view.
情態(tài)通過防止人們做其它事情(直到他們完成一個任務或者關閉對話别瞭、窗口)來創(chuàng)造焦點。動作表疲迂、警告和活動視圖提供了情態(tài)的體驗禾怠。當一個情態(tài)視圖在屏幕上出現(xiàn),用戶必須通過點擊按鈕做出選擇或者退出情態(tài)體驗变逃。一些app在編輯日歷中的事件或者選擇Safari中的標簽等情景時使用情態(tài)視圖必逆。一個情態(tài)視圖可以占據(jù)整個屏幕、父視圖例如一個彈窗或者屏幕的一部分揽乱。一個情態(tài)視圖通常包含完成和取消按鈕來退出視圖名眉。
Minimize最小化 the use of modality.?Generally, people prefer to interact with apps in nonlinear ways. Consider creating a modal context環(huán)境、上下文 only when it’s critical臨界的 to get someone’s attention, when a task must be completed or abandoned拋棄 to continue using the app, or to save important data.
最小化情態(tài)凰棉。一般來說人們偏向和app進行非線性的交互损拢。只有當迫不得已的時候才考慮使用情態(tài)環(huán)境來獲得用戶的注意力,比如必須要完成或者放棄一個任務才能繼續(xù)使用app或者保存重要的數(shù)據(jù)時撒犀。
Provide an obvious and safe way to exit a modal task.?Make sure people always know the outcome結果 of their action when they dismiss a modal view.
提供一個明顯且安全的方法來退出情態(tài)任務福压。確保人們知道他們離開一個情態(tài)視圖會出現(xiàn)什么結果。
Keep modal tasks simple, short, and narrowly focused.?Don’t create an app within your app. If a modal task is too complex, people can lose sight of the task they suspended懸浮绘证、暫停 when they entered the modal context. Be especially wary謹慎 of creating modal tasks that involve a hierarchy層級 of views because users can get lost and forget how to retrace折回 their steps. If a modal task must contain subviews, provide a single path through the hierarchy and a clear path to completion. Avoid using Done buttons for things other than completing the task.
保持情態(tài)任務簡潔隧膏、簡短并且重點突出。別在你的app里創(chuàng)建一個app嚷那。如果一個情態(tài)任務太復雜胞枕,人們在進后時會忘記他們之前的事情。創(chuàng)建涉及視圖層級的情態(tài)任務時要特別謹慎魏宽,因為用戶可能會迷失并忘記回去的步驟腐泻。如果一個情態(tài)任務必須包含子視圖,提供一個簡單的路徑來通過層級以及一個清晰的路徑來完成队询。避免在除了完成任務之外其它的情景中使用完成按鈕派桩。
Display a title that identifies a task, if appropriate.?You might also provide text in other portions部分 of the view that more fully describes the task or provides guidance.
如果合適,使用一個能夠識別任務的標題蚌斩。你也可以在視圖中的其它部分提供文本來更加全面的描述任務或提供指導铆惑。
Reserve保留 alerts for delivering essential—and ideally理想的 actionable—information.?An alert interrupts the experience and requires a tap to dismiss, so it’s important for people to feel that the intrusion is warranted必要的.?
為傳遞重要信息或理想的動作保留警告。一個警告會打斷體驗并且需要點擊才能消失,所以這個警告需要讓人們覺的它的存在足夠重要员魏。
Respect notification preferences選擇權.?In Settings, people specify規(guī)定 how they want to receive notifications from your app. Abide遵守 by these preferences so they aren’t tempted to turn off your app’s notifications entirely.
忍受通知的選擇權丑蛤。在設置中心,人們可以規(guī)定怎樣從你的app中收到通知撕阎。遵守這些規(guī)定使用戶不必想要把你的app的通知整個的關掉受裹。
Don’t display a modal view above a popover(彈出框).?With the possible exception of an alert, nothing should appear over a popover. In rare cases when you need to present a modal view after action is taken in a popover, close the popover before displaying the modal view.
不要在一個彈出框上顯示情態(tài)視圖。一個很少存在例外的警告虏束,沒有東西可以出現(xiàn)在彈窗上面棉饶。只有極少數(shù)的情況下,當你需要在一個彈窗上的動作完成后顯示情態(tài)視圖镇匀,先關閉彈窗然后再展示情態(tài)視圖照藻。
Coordinate調整 modal view appearance外觀 with your app.?A modal view may include a navigation bar, for example. When this is the case, use the same appearance as the navigation bar in your app.
跟隨你的app來調整情態(tài)視圖的外觀。例如汗侵,一個情態(tài)視圖可能包含導航條岩梳,在這種情況下,使用和你app同樣的導航條外觀晃择。
Choose an appropriate modal view style.?You can use any of these styles:
選擇一個情態(tài)視圖的外觀風格。你可以使用下面這些風格也物。
full screen 覆蓋整個屏幕宫屠。用在一個可能非常復雜的任務,能夠在情態(tài)視圖中完成滑蚯。page sheet 在更大的設備的水平視圖中浪蹂,部分的覆蓋下面的內容。所有的未覆蓋區(qū)域變暗以防止和它們相互作用告材。在較小的設備的縱向視圖中覆蓋整個屏幕坤次,在一個情態(tài)視圖中完成復雜任務時使用。
form sheet 出現(xiàn)在屏幕的中間但是當鍵盤出現(xiàn)的時候回重新定位斥赋。左右的未覆蓋區(qū)域變暗以防止和它們相互作用缰猴。在更小的設備上可能會覆蓋整個屏幕。用來收集信息疤剑。current context 和它的父視圖有一樣的尺寸滑绒。用來展示拆分視圖窗格、彈窗隘膘、和其它沒有鋪滿屏幕的情態(tài)視圖
Choose an appropriate合適的 transition過渡 style for revealing展現(xiàn) a modal view.?Use a transition style that coordinates使協(xié)調 with your app and enhances提高 the awareness意識 of the temporary臨時的 context shift轉變. The default transition vertically垂直的 slides the modal view up from the bottom of the screen and back down once dismissed. The flip-style transition appears to flip a view horizontally to reveal顯示 the modal view. Visually, the modal view looks like the back of the current view. It flips back once dismissed. Use consistent一致的 modal transition styles throughout your app.
選擇一個合適的過渡效果來展現(xiàn)情態(tài)視圖疑故。使用一種和你的app協(xié)調的過渡效果,提高界面轉換的效果弯菊。默認的過渡效果是從屏幕的下方垂直向上滑出情態(tài)視圖然后在消失的時候原路返回纵势。彈出風格的過渡是水平的彈出一個情態(tài)視圖。視覺上情態(tài)視圖看起來像在當前視圖的后面。在消失的時候彈回钦铁。在你整個app中使用統(tǒng)一的情態(tài)過渡風格软舌。