This shows you the differences between two versions of the page.
ios-labs-s14:intermediate-pics [2014/02/23 23:00] (current)
|Line 1:||Line 1:|
|+||All images and assets are stored in a special folder in projects called **Images.xcassets**. The purpose of separating them from the rest of the project is to streamline the process of managing multiple, different resolutions of the same image. |
|+||Open this folder to view assets. Add assets using the plus sign on the bottom left of the center screen. Drag and drop images from outside of xcode into the outlines on the screen to add them to the project (they are automatically added to the project). Each outline represents differently sized images, corresponding to the different resolutions in retina vs non-retina iOS devices, iPhones vs iPads. Having appropriately sized assets is very important for full-release apps.|
|+||To access an image stored in *.xcassets:|
|+||sampleImageView.image = [UIImage imageNamed:@"IMAGENAMEHERE"]|
|+||where IMAGENAMEHERE is the name of the image as shown in the folder (case-sensitive).|