Asset Catalog - Image
This tutorial requires a couple of image files (sun.png & moon.png) which can be downloaded from here: Images1. Launch Xcode and choose File > New > File… (⌘N)
2. In the template sheet...
b) scroll down to the 'Resource' section and choose "Asset Catalog"
c) click the "Next" button
3. Click the "Create" button and save the file as "Assets" to your FB app folder
4. An empty asset catalog will be displayed. Click the '+' button at the bottom of the outline view and choose New Image Set from the menu
5. Give the image set a name
6. Show the Attributes Inspector (⌥⌘4). Uncheck 'Universal' and check 'Mac'
7. Change Appearance to 'Any, Dark'
8. We want the moon image to be displayed when we're in light mode so drag the moon image file to the '1x Any Appearance' box
9. Option-copy the image from '1x Any Appearance' to '2x Any Appearance'
10. Drag the sun image file to the '1x Dark' box and option-copy it to the '2x Dark' box
11. We're done with the Assets file so close it
12. In FutureBasic, create a new file and paste the following code
11. Save the FB file to the same folder as the asset catalog and run it