Asset Catalog Help (七)---Customizing Image Sets for Devices

Customizing Image Sets for Devices

Add images to a set that are customized for display on the devices supported by your app.

应用程序支持把图片加入一个自定义图片集,用来在不同设备商显示。

  1. In the set list, select an image set.

    在图片集列表中,选择一个图片集。

  2. Open the utilities area for the workspace window by clicking the Show Utilities button ().

    点击()显示工作区窗口的工具区(utilities area).

  3. In the inspector bar, click the Attributes Inspector button ().

    在inspector 栏,点击属性检查按钮 ()。

  4. From the Device pop-up menu, choose Device Specific.

    在Device弹出菜单那,选择Device Specific.

  5. Use the checkboxes in the Attributes inspector to select the devices.

    在属性检查器内选择需要设置的设备。

    In the figure above, the image is customized for the iPhone and Apple Watch. The image still needs files for the retina 4-inch iPhone and both resolutions for the iPad.

    上图,Image图片集是为iPhone和Apple Watch定义的。 图片集还需要retina 4-inch尺寸的iPhone文件,以及iPad的两种分辨率文件。

You need to add device specific images to a set only when your app needs to display different sizes of the image on different devices. For example, a background image for your main view showing a watermark of your logo could need all of the different sizes shown in the figure above. But an icon for a button that does not vary between devices can use only the universal setting shown in the first figure because no special sizes are required.

只有当你的应用程序需要在不同的设备上显示不同尺寸的图片时才需要把设备指定的图片放入一个集合。 比如,一张用于主视图的背景图片,图片上需要打印不同尺寸的Logo水印时可以使用上图所示的指定特殊设备的图片集。如果只是一个用于按钮的图标,它在不同设备间不会变化的图标,则只需要使用图一种的universal设置,因为不需要特殊的尺寸。

Customizing your images for devices is one way that your app can support multiple screen sizes and orientations. For apps designed for iOS 8 and later, size classes provide a more flexible alternative.

为不同设备自定义不同图片是让你的应用程序支持多个屏幕尺寸和方向的一种方法。对于iOS8或以上版本的应用程序,尺寸类可以提供一种更加灵活的替代选择。

Related Articles

相关文章


Copyright © 2015 Apple Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2015-03-09

Feedback

*

*

* Required information

时间: 2024-10-28 03:36:03

Asset Catalog Help (七)---Customizing Image Sets for Devices的相关文章

Asset Catalog Help (七)---Customizing Image Sets for Size Classes

Customizing Image Sets for Size Classes Add images to a set that are customized for display in different size classes supported by your app. 应用程序也支持把图片存入一个自定义集合,用来在不同的尺寸类中显示. In the set list, select an image set. 在集合列表(set list)中,选择一个图片集. Open the ut

Asset Catalog Help (三)---Adding Image Sets

Adding Image Sets Organize versions of your images in image sets, which you can add to an asset catalog. 你可以用图片集组织管理不同版本的图片 ,图片集可以放入一个asset catalog. In the project navigator, select an asset catalog. 在项目导航区(project navigator)中,选择一个asset catalog. Sele

Asset Catalog Help (十)---Removing Images and Sets

Removing Images and Sets Optimize the size of an asset catalog by removing unused images or sets. 通过删除不用的图片或图片集优化一个asset catalog的大小. Do one of the following: 可以使用以下方法: Remove an image from its set by Control-clicking the image and choosing Remove Sel

Asset Catalog Help (九)---Specifying a Resizable Area of an Image

Specifying a Resizable Area of an Image Use the Xcode Slicing feature to specify the dimensions of a resizable center area of the image and to optionally specify end caps, which are areas of the image that should not be filled by the resizable area.

Asset Catalog Help (八)---Changing Image Set Names

Changing Image Set Names Use the Attributes inspector to edit a set’s name. 使用属性检查器(Attributes inspector)可以编辑一个图片集的名字. In the set list, select a set. 在集合列表,选择一个图片集. Open the utilities area for the workspace window by clicking the Show Utilities butto

Asset Catalog Help (一)---About Asset Catalogs

About Asset Catalogs Use asset catalogs to simplify management of images that are used by your app as part of its user interface. 使用asset catalogs可以简化应用程序中需要使用图片的管理,把它们作为用户界面的一部分. An asset catalog can include: 一个asset catalog可以包括以下内容: Image sets: Use

Asset Catalog Help (二)---Creating an Asset Catalog

Creating an Asset Catalog Create an asset catalog to simplify management of your app’s images. 创建一个asset catalog来简化管理应用程序图片. Choose File > New > File. 选择File > New > File. Under iOS or OS X, select Resource. 在iOS 或 OS X中选择 Resource. Select Ass

Asset Catalog Help (六)---Adding OS X Icons

Adding OS X Icons Simplify image management by storing your OS X icons in an asset catalog. 把OS X图标存进一个asset catalog里可以简化图片管理. In the project navigator, select an asset catalog. 在项目导航区,选择一个asset catalog. Choose Editor > New OS X Icon. 选择Editor > New

【译】4个你需要知道的Asset Catalog的秘密

本文由CocoaChina译者 @唧唧歪歪 翻译,作者:Hector Matos 原文:4 XCODE ASSET CATALOG SECRETS YOU NEED TO KNOW 恶梦 想象你正在干活,你的上级要求你在工程中加入一些图片.你找到团队中的设计师(如果你们有一个的话),鼓起勇气,问他要这些图片.不过,通常他都会忙得根本没时间帮你.因为他要做的活儿比你还多.说实话,你到底见过一个设计师有多少活儿要做吗?!简直多到令人发指啊!所以你最不想做的就是成为那个再给他加活儿的人了.特别是那些活