About Texture Atlases
Combine your app’s image files automatically into one or more large images, called texture atlases, for improved app performance.
A texture atlas provides a way to improve the performance of your apps by combining all of the app’s image assets into one or more large images. This provides you with a way to improve the performance of your app by drawing multiple images with a single draw call.
During build time, the compiler looks for any folders with the naming format of name
.atlas. After those folders have been identified, all of the images within the folders are combined into one or more large image files. Texture atlases are automatically available to apps that include the Sprite Kit framework. You can use texture atlases in apps that don’t enable Sprite Kit by setting the Enable Texture Atlas Generation build setting in Xcode and manually reading the generated
.plist. This build setting appears in the build setting list only if you have a
.atlas folder in your project.
The following image shows four image files combined into a single texture atlas image.
After the app is built, new folders are created with a
.atlasc suffix and placed in your app bundle’s Resource folder. Those new images are automatically rotated and trimmed to fit the maximum number of images into a single file, one whose images and orientation are tracked by a property list (
.plist) associated with the folder. You do not need to change your code in order to use the texture atlas feature.
When generating the
.atlasc folders and image files, the following rules apply:
Each compiled image has a maximum size of 4098 x 4098 pixels in iOS 8.0 or later.
In iOS 7.0 the maximum size is 2048 x 2048 pixels.
After an image has reached its maximum size, a new image is created.
Images for the same device are kept together—for example, all iPhone images are in one file (
~iphone.1.png), and all iPad images are in another file (