Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Xcode 8

You're reading from   Learning Xcode 8 Learn to build iOS Applications with Xcode 8

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781785885723
Length 480 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Tiano Tiano
Author Profile Icon Tiano
Tiano
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Learning Xcode 8
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Starting Your iOS Journey FREE CHAPTER 2. Welcome to Xcode 3. Introduction to Swift 3 4. Using Storyboards, Auto Layout, and Size Classes 5. Taking Advantage of Source Control in Xcode 6. Building Your First iOS App 7. Integrating Multitouch and Gestures 8. Exploring Common iOS Frameworks 9. Working with Core Data 10. Creating a watchOS Companion App 11. Advanced Input Using Sensors 12. Sending Notifications 13. Writing Unit Tests 14. Debugging an iOS Application 15. Optimizing Your App 16. Distributing an iOS App Index

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 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images