Reader small image

You're reading from  Learning Xcode 8

Product typeBook
Published inNov 2016
Reading LevelBeginner
PublisherPackt
ISBN-139781785885723
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Jak Tiano
Jak Tiano
author image
Jak Tiano

Jak Tiano is an iOS and game developer living in Burlington, VT. In 2015 he graduated with top honors from the game development program at Champlain College, and is now programming educational robotics games at Xemory Software. In his spare time, he always keeping up with the latest iOS technologies. Jak first learned how to code as a freshman in high school, when the very first iPhone SDK was released. After a year of learning the basics of C++ and Objective-C, he released his first iPhone app in the summer of 2009. Since then, he has programmed over 30 iOS apps and games, releasing a handful along the way. In both 2013 and 2014, he attended Apple's World Wide Developers' Conference in San Francisco on direct scholarship from Apple. He's been programming with Swift exclusively since its release in 2014, and has served as a technical reviewer on Swift 2 Blueprints, Cecil Costa, Packt Publishing.
Read more about Jak Tiano

Right arrow

PhotoSnippet implementation


Now that we've added text snippets, let's allow the user to create photo snippets. This user story says "I want to attach a photo to a snippet". The associated tasks are:

  • Create a new subclass of SnippetData that represents the PhotoSnippet

  • Create a new view controller with a UIImagePickerController that allows the user to take a picture and save the data to the PhotoSnippet.

Just like our last story, we're first going to update our data model to support the new snippet we are creating. Then we're going to build another data entry view controller, but this time it will let the user take a picture. Don't worry, though; it might be easier than you think.

Update SnippetData model

Current task: Create a new subclass of SnippetData that represents the PhotoSnippet.

For our photo snippet, we'll be creating another subclass of the SnippetData class. However, instead of holding a String property, it's going to hold a UIImage. To start, head over to our SnippetData.swift file...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Xcode 8
Published in: Nov 2016Publisher: PacktISBN-13: 9781785885723

Author (1)

author image
Jak Tiano

Jak Tiano is an iOS and game developer living in Burlington, VT. In 2015 he graduated with top honors from the game development program at Champlain College, and is now programming educational robotics games at Xemory Software. In his spare time, he always keeping up with the latest iOS technologies. Jak first learned how to code as a freshman in high school, when the very first iPhone SDK was released. After a year of learning the basics of C++ and Objective-C, he released his first iPhone app in the summer of 2009. Since then, he has programmed over 30 iOS apps and games, releasing a handful along the way. In both 2013 and 2014, he attended Apple's World Wide Developers' Conference in San Francisco on direct scholarship from Apple. He's been programming with Swift exclusively since its release in 2014, and has served as a technical reviewer on Swift 2 Blueprints, Cecil Costa, Packt Publishing.
Read more about Jak Tiano