Layout
People generally want the ability to use their favorite apps on all of their devices and in any orientation. In iOS, interface elements and layouts can be configured to automatically change shape and size on different devices, during multitasking on iPad, in split view, and when the screen is rotated. It’s essential that you plan ahead and design an app that provides a great experience in any context.
用戶一般希望在任何方向都能使用他們喜歡的app在他們所有設(shè)備上。在iOS上蹄衷,界面元素和布局可以被配置成在不同的設(shè)備下自動改變形狀和大小忧额,在iPad多任務(wù)時,在分割視圖愧口,和屏幕被旋轉(zhuǎn)時睦番。你提前計劃和設(shè)計在任何環(huán)境提供良好體驗一個app,是很有必要的耍属。
Maintain focus on the current content during context changes.Content is your highest priority. Changing focus when the environment changes can be disorienting, frustrating, and make people feel like they’ve lost control of the app.
在環(huán)境改變時維持關(guān)注當(dāng)前內(nèi)容抡砂。內(nèi)容是你的最高優(yōu)先級大咱。當(dāng)環(huán)境改變關(guān)注會令人迷惑,沮喪注益,和使用戶覺得失去了對app的控制碴巾。
Ensure primary content is clear at its default size.People shouldn’t have to scroll horizontally to read important text, or zoom to see primary images, unless they choose to change the size.
確保主要內(nèi)容在它初始大小是清晰的。用戶不應(yīng)該不得不橫向滑動來閱讀重要文本丑搔,或者縮放來查看主要圖片厦瓢,除非他們選擇改變大小。
Maintain an overall consistent appearance throughout your app.In general, elements with similar functions should look similar.
貫穿app維持一個一致的外觀啤月。一般煮仇,有相同功能的元素應(yīng)該看起來相似。
Use visual weight and balance to convey importance.Large items catch the eye and appear more important than smaller ones. Larger items are also easier to tap, which is especially important when an app is used in distracting surroundings, such as in the kitchen or a gym. In general, place principal items in the upper half of the screen and—in a left-to-right reading context—near the left side of the screen.
使用可見的權(quán)重和平衡來傳達(dá)重要性谎仲。大的項目捕獲眼球浙垫,看起來比小的項目更重要。大些的項目也更容易被點擊郑诺,當(dāng)在容易分心的環(huán)境使用app時這點特別重要夹姥,例如在廚房或健身房。一般辙诞,將主要的item放在屏幕上半邊-在一個從左到右的閱讀環(huán)境-靠近屏幕的左邊辙售。
Use alignment to ease scanning and to communicate organization and hierarchy.Alignment makes an app look neat and organized, helps people focus while scrolling, and makes it easier to find information. Indentation and alignment can also indicate how groups of content are related.
使用對齊來減少瀏覽和傳達(dá)組織結(jié)構(gòu)和層級。對齊使得一款app看起來整潔和有組織飞涂,幫助用戶專注當(dāng)滾動時旦部,和使得找信息變得容易〗系辏縮進和對齊也可以表明相關(guān)的內(nèi)容如何組織士八。
Avoid gratuitous layout changes.Just because someone rotates a device doesn’t mean the entire layout needs to change. For example, if your app shows a grid of images in portrait mode, it doesn’t have to present the same images as a list in landscape mode. Instead, it might simply adjust the dimensions of the grid. Try to maintain a comparable experience in all contexts.
避免無理由的布局改變。僅僅因為某人旋轉(zhuǎn)一個設(shè)備不意味著整個布局需要改變梁呈。例如婚度,如果你的app在豎屏模式顯示一個圖表表格,在橫屏模式它不必要呈現(xiàn)相同的圖像捧杉。取而代之,它可能僅僅改變grid的維度秘血。嘗試在所有環(huán)境維持一個相同的體驗味抖。
If possible, support both portrait and landscape orientations.People prefer to use apps in different orientations, so it’s best when you can fulfill that expectation.
如果可能,支持豎屏和橫屏兩種模式灰粮。用戶希望在不同的方向使用app仔涩,所以你最好滿足這個期望。
If your app supports only one orientation, support both variants.If it’s essential that your app run in a single orientation, make sure it supports both orientation variants. For example, if your app only runs in landscape mode, it should be usable regardless of whether the Home button is on the left or the right. If the device is rotated 180 degrees while using your app, your app should respond by rotating its content 180 degrees. If your app doesn't rotate automatically when someone holds the device wrong, they'll know instinctively to rotate it. You don't need to tell them.
如果你的app只支持一個方向粘舟,支持不同的變體熔脂。若果你的app必須運行在單一的方向佩研,確保它支持兩種方向的變種。例如霞揉,如果你的app只能運行在橫屏模式旬薯,它應(yīng)該可用不管Home button是在左邊還是右邊。如果設(shè)備旋轉(zhuǎn)180度适秩,app的內(nèi)容也應(yīng)該跟著旋轉(zhuǎn)180度绊序。如果你的app不自動旋轉(zhuǎn),當(dāng)某人拿設(shè)備的方向不對秽荞,他們本能知道要旋轉(zhuǎn)它骤公,你不需要告訴他們。
Customize your app’s response to rotation according to context.A game that lets people move a character by rotating the device, for example, probably shouldn’t switch orientations during gameplay. It could, however, display menus and intro sequences based on the current orientation.
定制你的app根據(jù)環(huán)境回應(yīng)旋轉(zhuǎn)扬跋。一個游戲允許用戶移動一個角色通過旋轉(zhuǎn)設(shè)備阶捆,例如,也許不應(yīng)該轉(zhuǎn)換方向在玩游戲時钦听。它可以洒试,無論怎樣,顯示菜單和介紹順序基于當(dāng)前方向彪见。
Provide ample spacing for interactive elements.Try to maintain a minimum tappable area of 44pt x 44pt for all controls.
為交互元素提供足夠空間儡司。嘗試為所有控制提供一個最小44pt*44pt的可點擊范圍。
Be prepared for text size changes.People expect most apps to respond appropriately when they choose a different text size in Settings. To accommodate some text-size changes, you might need to adjust the layout. For more information about text usage in your app, seeTypography.
為文本大小改變做好準(zhǔn)備余指。用戶期望所有app反應(yīng)正常當(dāng)他們在Settings中選擇一個不同的文本字體捕犬。為了適應(yīng)一些字體大小改變,你可能需要改變布局酵镜。For more information about text usage in your app, seeTypography.
For developer guidance on adaptivity, seeAuto Layout Guide.