Text snippet implementation
The next user story is "I want to enter text when creating a snippet". The tasks we need to complete for this feature are:
Create a new subclass of
SnippetData
that represents theTextSnippet
Create a new view controller with a
UITextField
that saves the text input in theTextSnippet
Now it's time to start building out useful snippet-creation tools. Right now we spawn some empty SnippetData
structs, but there's no user data in there. First we're going to add to our SnippetData
struct to allow it to hold user data, and then build an interface that allows the user to enter and save the data.
Update SnippetData model
Current task: Create a new subclass of SnippetData
that represents the TextSnippet
.
So far, our data model doesn't do much aside from hold a type identifier. Now we want to create a subclass of our data model that gives us the ability to store information for our text data. There's only one problem… you can't subclass a struct. You can only subclass a class...