-
Notifications
You must be signed in to change notification settings - Fork 48
Images and Icons
Image, color, and texture sets are located in Assets.xcassets
in the project directory. Images can also be created through swift code and applied to interface objects.
Dark Mode adoption requires both a light and dark variant of the image and the transition is automatically handled provided that the image is stored in an image set (using the provided left-panel
image set will adjust the project without the need to re-map in interface builder). Each variation has two sizes (1x and 2x) using the following pixel dimensions:
1x : 320 x 520
2x : 640 x 1040
The application icon uses the standard AppIcon
image set. Each resolution has two variations (1x and 2x) using the following pixel dimensions:
16x16.png : 16 x 16
16x16@2x.png : 32 x 32
32x32.png : 32 x 32
32x32@2x.png : 64 x 64
128x128.png : 128 x 128
128x128@2x.png : 256 x 256
256x256.png : 256 x 256
256x256@2x.png : 512 x 512
512x512.png : 512 x 512
512x512@2x.png : 1024 x 1024
For this example, we are looking at app icons used for the bundle info popovers. If the image set is configured for Universal, there will be three variations. If configured for Mac, there will be two. These image sets were brought over from an earlier build of the application set to Universal with the following pixel dimensions:
icon.png : 33 x 34
icon@2x.png : 66 x 68
icon@3x.png : 99 x 102
These images can be accessed by their image set name ie. NSImage(named: "notes-icon")
.