New snippet
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.
SnippetData model
Current task: Create a model class for bare-bones SnippetData
.
For the time being, we're ...
Get Learning Xcode 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.