Prelude To Design
An overview explaining why & how we chose to create COSMOS in the first place.
I’ve created an almost empty project for you to work with throughout the COSMOS tutorial. This is an Xcode project that has empty classes into which you’ll add code, all the assets (including audio files), and a local version of C4.
Let’s have a look at how things are structured.
Open the project now.
With the project open in Xcode, you’ll see something that looks like this, on the left-hand side of the window:
This is the project navigator and it allows you to order, search and navigate all the files in your project.
There are 7 swift files:
Of these, you won’t be touching the
AppDelegate, but you will be working fairly extensively with all the other projects.
Throughout the tutorial each of the chapters will specify which file you need to code into. For example, in the Infinite Scrollview chapter all your code will go into the
There are 2 types of assets: visual and audio. The audio files are kept in a group and are all
mp3 files. The visual assets are all contained within an Assets.xcassets group and organized as image sets where each “image” is actually made up of
In this project I’ve included static copies of all the C4 files. Typically this is NOT how you’ll use C4, but for this tutorial organizing things this way makes sure that the code we’re writing today will be consistent with the way C4 exists at the time of writing this tutorial.
The difference in embedding C4 the way we’ve done vs. the other way where we embed an C4 Xcode project is nominal. Both end up having the same effect, except that in the latter it’s possible to update the project to stay current with any new releases that are pushed the the main Github repo.
You shouldn’t need to access the C4 files at any point throughout the tutorial, but they’re there for you to look at if you have any interest in digging in to see what’s happening at a lower level.