-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learning Xcode 8
By :

Our first story is "I want to be able to create a new snippet". For this feature, we have two tasks:
Create a model class for bare-bones SnippetData
Create a toolbar with a button that, when pressed, creates new SnippetData
and adds it to an array
For the first task, we are going to create a simple Swift struct that will hold the data for our snippet. There won't be a whole lot going on here! For the second task, we'll be going into our storyboard and adding some UI elements, then adding some code for our button to execute when pressed. Remember, the goal is just to have a button create a new instance of a data structure, nothing more.
Current task: Create a model class for bare-bones SnippetData
.
For the time being, we're not really sure what is going to go into our SnippetData
model. Looking at our project specs, we know that we're eventually going to want to store text, photos, and timestamps, but for now we just know that it will be a struct, and that we need...