playgrounds swift introduction
TRANSCRIPT
Who Am I?
Software Developer from Baltimore, Maryland
Works for Planit Advertising
Writing iOS Apps since 2008
Hockey Player
Pokémon Player
Agenda
Overview of Swift
Learn a bit about Playgrounds
See what you can do in Playgrounds
Build a small app in Swift, utilizing Playgrounds
What Is Swift?
New programming language developed by Apple
Introduced at WWDC14
Works alone, or side-by-side with Objective-C
Powerful and Fast
What Playgrounds Aren’t
Where to write full app
How to test code on a device
A way to test code that requires user interaction
A way to performance test your code
How Do Playgrounds Work?
Code is on the left
Results are on the right
Every code change recompiles
Timelines show results in more detail
Features Of Playgrounds
Quick Look
Available for:
Colors
Strings
Images
Views
Arrays/Dictionaries
And many more…
Features Of Playgrounds
Timeline
Preview code as it’s written
View changes in real time
Scrub through codes execution in time
Playground vs Project
Playground
File -> New -> Playground
Enter Name
Select Platform
Write Code
Project
Create Project
Choose Template
Save Project
Create Files
Write Code
Set Up Provisioning
Build
Run
Our Playground
What we did:
Used a for loop
Created and modified a UIColor variable
Created and previewed a UIView
What we didn’t do:
Create an Xcode Project
Never “built” the code
So much more!
What Else Can Playgrounds Do?
XCPlayground
Custom Quick Looks
Quick Look you custom objects
Use Resources
API’s
Images
Asynchronous Code
Let’s Build Something
Goal
Create a fully functioning app in Swift
Use a Playground to test as we go
Caveats
Storyboard pre-made
Project already set up
Code is pre-written/pre-tested
Resources
WWDC14 Session 408 - Swift Playgrounds
The Swift Programming Language - iBooks
Code/Slides available at www.jcurcio.com