About Asset Catalogs
Use asset catalogs to simplify management of images is used by your app as part of the its user interface.
Using asset catalogs simplifies the management of images that need to be used in applications as part of the user interface.
An asset catalog can include:
A asset catalog can include the following:
Image sets:used for most types of images, a image set contains all the versions, or representations, O F an image that is necessary to the support various devices and the scale factors.
Image set: Used to store most types of images, a collection of pictures containing all the image versions that can meet a number of different devices and scaling factors.
APP Icons:app icon sets contain all the representations of the icons that IOS apps must provide to being displayed on a Devic E ' s Home screen and in the App Store.
App icon: The app icon set contains all the size icons required by the iOS app for the device's screen and the Apple Store.
Launch images:launch image sets contain all the representations of the "static Launch image" IOS apps must provide to Be temporarily displayed if the app is launched.
Start Picture: The Start Picture collection contains a static boot picture of all the dimensions required by the iOS application. They are used to transition when the application is started.
OS X Icons:os x icon sets contain all the representations of a icon that OS X apps must provide.
OS X icon: the OS X icon set contains all the size icons required by the OS X application.
View and customize the contents of asset catalogs using three main areas:
View and customize the contents of the asset catalogs using the following three main areas:
Set list: see a list of all image sets, app icon sets, and image launch sets in the selected asset catalog.
Collection list: View all the lists in the asset catalog, including all picture sets, app icon sets, and launch picture sets.
Set Viewer: View the individual image representations for the selected set.
View Settings area: View all picture sizes for the selected collection.
-
set Attributes Inspector: depending on what ' s selected in the Set Viewer, you can view and edit image attributes. Editable attributes include a set ' s name, image types, template setting, and supported devices, size classes, and IOS vers Ions. You can view the properties of a image including name, size, color space, as well as others.
Set Property Inspector: You can view and edit picture properties, depending on the selection of the View Settings area. Editable properties include the name of a collection, the type of picture, template settings, and supported devices, various size classes (size classes), and iOS versions. You can also view all the property information for the selected picture, including the image name, size, color space, and so on.
Each set of asset catalog has a name. You can use this name to programmatically load any individual image contained in the set. To load a image, call the Platform specific class method, passing in the name of the the set that contains the image. The OS would load the image from the set, which is the most appropriate for the factor. The platform method for IOS is imageNamed:
. For OS X The platform method isimageNamed:
Each collection in the asset catalog has a name. You can use that name to programmatically load any picture in a collection. To load a picture, you need to invoke the platform-specified class method, passing in the name of the collection as a parameter. The OS (OS) loads the picture that best fits the current zoom factor from the collection. The platform method for IOS is imagenamed:. The platform method for OS X is imagenamed:
Xcode 6 provides different functionality for asset catalogs depending on the deployment target for your project:
Xcode 6 provides different capabilities for asset catalogs based on the different deployment goals of the project (deployment target):
For all projects, the individual images can be loaded using set names.
All items can be loaded with the collection name inside any image.
For projects with a deployment target of in least IOS 7 or OS X 10.9, Xcode compiles your asset catalogs into a runtime bi Nary file format that reduces the download time for your app.
For projects with iOS 7 or OS X 10.9 or more, Xcode compiles asset catalogs into a running binary format, which reduces the download time of the application.
Each asset catalog in Xcode have a corresponding folder in the Finder, with an. xcassets extension, and subfolders for each Set. Each of the Set folder in turn contains it image representations, along with a Contents.json
file, describing each image. That file was automatically created by Xcode.
Each asset catalog in Xcode can find the appropriate folder in the Finder with the file name extension. xcassets, which has folders for each collection. Each folder contains images of all sizes and a Contents.json file, which is used to describe all images. The JSON file was created automatically by Xcode.
You can share asset catalogs across multiple projects in the same workspace.
You can share asset catalogs across multiple projects in the same workspace.
Related articles
Related articles:
- Creating an Asset Catalog
Asset Catalog Help (i)---about Asset catalogs