: Jesse Feiler
: Exploring Swift Playgrounds The Fastest and Most Effective Way to Learn to Code and to Teach Others to Use Your Code
: Apress
: 9781484226476
: 1
: CHF 36.40
:
: Informatik
: English
: 196
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF
Learn how to build playgrounds so you can test your code, syntax, and ideas quickly. You can even learn from playgrounds built by others or build playgrounds to teach. And the playgrounds you build and use on your Mac and on your iPad are automatically shared using your Apple ID. 

div>Exploring Swift Playgrounds shows you how to use playgrounds to try out your basic app design ideas to see what they look like and how they behave. It doesn't matter if you can't remember a pesky little bit of syntax. Rather than look it up, you can try it out in a playground. More and more of the APIs are now available through playgrounds, so that you can do more than ever before. 

< div>
Going beyond print, the Swift Playgrounds book tool allows for immersive experiences for users learning code, organization processes, and anything else that can be described in the rich (and free) authoring tools provided by Apple. All of which you can learn how to use in Exploring Swift Playgrounds.

What You'll Learn:
  • Build Swift playgrounds for others to use
  • Teach yourself and others with Swift playgrounds
  • Use Swift playgrounds in your development process

b>Who This Book Is For:

Students with no prior coding knowledge and experienced developers.
br />

Jesse Feiler is a developer, consultant, and author specializing in database technologies and location-based apps. He is the creator of Minutes Machine the meeting management app, as well as Saranac River Trail app a guide to the Trail that includes location-based updates as well as social media tools. His apps are available in the App Store and are published by Champlain Arts Corp (champlainarts.com). Jesse is heard regularly on WAMC Public Radio for the Northeast's The Roundtable. founder of Friends of Saranac River Trail, Inc. A native of Washington DC, he has lived in New York City and currently lives in Plattsburgh NY.


Contents at a Glance4
Contents5
About the Author9
About the Technical Reviewer10
Introduction11
Chapter 1: Introducing Swift Playgrounds12
Developer Overview12
Xcode13
Building the Single View Application in Xcode13
Exploring the Single View Application16
Looking into the Frameworks18
Swift Playgrounds18
Building the Classic Hello World App18
Building a Hello Playground19
Setting Fonts in Xcode21
Summary22
Chapter 2: Creating a Simple Swift Playground on Xcode23
Getting Started with a Playground, Code, and Results23
Setting Up the Playground24
Watching Variables and Using Code Completion25
Running the Playground30
Dealing with Errors30
Handling Syntax Errors30
Handling Contextual Errors32
Summary35
Chapter 3: Looking at Swift Basics for Playgrounds36
Comments and Markup36
Globals and Objects39
Classes, Enumerations, and Structures40
Types in Swift41
Properties42
Constants and Variables43
Lazy Initialization43
Optional Properties43
Summary48
Chapter 4: Editing Playgrounds on macOS49
Exploring the Two Playground Environments49
Creating a Playground with Xcode on macOS50
Turning a Static Playground into an Interactive Playground51
Moving a Playground from Xcode/Mac to Playgrounds/iPad54
Managing Interaction in a Playground59
Creating and Using an Editable Area60
Summary71
Chapter 5: Editing Playgrounds on iOS72
The Playgrounds App User Interface and Experience72
Using the Shortcut Bar76
Inserting a Simple Line of Code76
Inserting More Complex Syntax77
Choosing a Color81
Choosing an Image81
Putting the Pieces Together: Writing a Class in a Playground with the Shortcut Bar84
Typing the Code84
Using the Shortcut Bar to Write the Code86
Creating an Empty Playground86
Show the Keyboard and Handle the Red Dot88
Complete the Class Definition90
Summary96
Chapter 6: Entering Data and Viewing Results in Swift Playgrounds97
Using the Timeline98
Creating a Basic Playground with a View102
Looking at Your View in the Timeline103
Add a Second View to the Live View104
Working with Interactive Data Entry107
Creating a New Playground108
Creating a View Controller for the Live View108
Creating the View Controller Views109
Creating the Main View Subview110
Creating the Text Field Subview111
Creating the Label Subview112
Assembling the View Controller112
Managing Text Fields112
Updating the Text113
Finishing Up the View Controller113
Trying Out the Playground114
Exploring the Playground115
Summary118
Chapter 7: Adding Resources and Source Code to Playgrounds119
Looking Inside a Playground119
Exploring a Playground in the Finder (macOS)121
Contents.swift124
contents.xcplayground125
playground.workspace125
Exploring a Playground in Playgrounds (iOS)126
Adding Resources to a Playground130
Adding Code to a Playground137
Summary147
Chapter 8: Using Touch Gestures in Interactive Playgrounds148
Understanding Gestures Using Playgrounds149
Creating a Basic Gesture Playground in Xcode on macOS149
Creating a Playground with Live View149
Create a GestureView Class150
Creating an Instance of GestureView153
Adding a Gesture to GestureView154
Adding Another GestureView155
Finishing Up156
Creating a Basic Gesture Playground in Playgrounds on iPad158
Working with Gestures in a Playground164
Summary171
Chapter 9: Building a Complex Playground172
Collecting Your Playground Pages and Creating the MultiPlayground172
Assembling Playground Pages for Basic Navigation177
Using Basic Link Navigation179
Enhancing Navigation186
Changing Link and File Names186
Adding a Constant Link (Home)188
Using a Basic File for All Pages189
Making Further Enhancements191
Summary192
Index193