Exploring Swift Playgrounds (eBook)
XIII, 192 Seiten
Apress (Verlag)
978-1-4842-2647-6 (ISBN)
- Build Swift playgrounds for others to use
- Teach yourself and others with Swift playgrounds
- Use Swift playgrounds in your development process
Who This Book Is For:
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.
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. 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. 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 useTeach yourself and others with Swift playgroundsUse Swift playgrounds in your development processWho This Book Is For:Students with no prior coding knowledge and experienced developers.
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 Glance 4
Contents 5
About the Author 9
About the Technical Reviewer 10
Introduction 11
Chapter 1: Introducing Swift Playgrounds 12
Developer Overview 12
Xcode 13
Building the Single View Application in Xcode 13
Exploring the Single View Application 16
Looking into the Frameworks 18
Swift Playgrounds 18
Building the Classic Hello World App 18
Building a Hello Playground 19
Setting Fonts in Xcode 21
Summary 22
Chapter 2: Creating a Simple Swift Playground on Xcode 23
Getting Started with a Playground, Code, and Results 23
Setting Up the Playground 24
Watching Variables and Using Code Completion 25
Running the Playground 30
Dealing with Errors 30
Handling Syntax Errors 30
Handling Contextual Errors 32
Summary 35
Chapter 3: Looking at Swift Basics for Playgrounds 36
Comments and Markup 36
Globals and Objects 39
Classes, Enumerations, and Structures 40
Types in Swift 41
Properties 42
Constants and Variables 43
Lazy Initialization 43
Optional Properties 43
Summary 48
Chapter 4: Editing Playgrounds on macOS 49
Exploring the Two Playground Environments 49
Creating a Playground with Xcode on macOS 50
Turning a Static Playground into an Interactive Playground 51
Moving a Playground from Xcode/Mac to Playgrounds/iPad 54
Managing Interaction in a Playground 59
Creating and Using an Editable Area 60
Summary 71
Chapter 5: Editing Playgrounds on iOS 72
The Playgrounds App User Interface and Experience 72
Using the Shortcut Bar 76
Inserting a Simple Line of Code 76
Inserting More Complex Syntax 77
Choosing a Color 81
Choosing an Image 81
Putting the Pieces Together: Writing a Class in a Playground with the Shortcut Bar 84
Typing the Code 84
Using the Shortcut Bar to Write the Code 86
Creating an Empty Playground 86
Show the Keyboard and Handle the Red Dot 88
Complete the Class Definition 90
Summary 96
Chapter 6: Entering Data and Viewing Results in Swift Playgrounds 97
Using the Timeline 98
Creating a Basic Playground with a View 102
Looking at Your View in the Timeline 103
Add a Second View to the Live View 104
Working with Interactive Data Entry 107
Creating a New Playground 108
Creating a View Controller for the Live View 108
Creating the View Controller Views 109
Creating the Main View Subview 110
Creating the Text Field Subview 111
Creating the Label Subview 112
Assembling the View Controller 112
Managing Text Fields 112
Updating the Text 113
Finishing Up the View Controller 113
Trying Out the Playground 114
Exploring the Playground 115
Summary 118
Chapter 7: Adding Resources and Source Code to Playgrounds 119
Looking Inside a Playground 119
Exploring a Playground in the Finder (macOS) 121
Contents.swift 124
contents.xcplayground 125
playground.workspace 125
Exploring a Playground in Playgrounds (iOS) 126
Adding Resources to a Playground 130
Adding Code to a Playground 137
Summary 147
Chapter 8: Using Touch Gestures in Interactive Playgrounds 148
Understanding Gestures Using Playgrounds 149
Creating a Basic Gesture Playground in Xcode on macOS 149
Creating a Playground with Live View 149
Create a GestureView Class 150
Creating an Instance of GestureView 153
Adding a Gesture to GestureView 154
Adding Another GestureView 155
Finishing Up 156
Creating a Basic Gesture Playground in Playgrounds on iPad 158
Working with Gestures in a Playground 164
Summary 171
Chapter 9: Building a Complex Playground 172
Collecting Your Playground Pages and Creating the MultiPlayground 172
Assembling Playground Pages for Basic Navigation 177
Using Basic Link Navigation 179
Enhancing Navigation 186
Changing Link and File Names 186
Adding a Constant Link (Home) 188
Using a Basic File for All Pages 189
Making Further Enhancements 191
Summary 192
Index 193
Erscheint lt. Verlag | 5.4.2017 |
---|---|
Zusatzinfo | XIII, 192 p. 168 illus., 164 illus. in color. |
Verlagsort | Berkeley |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
Schlagworte | Apple • Ios • iPad • iPhone • language • Mac • programming • SDK • Software • SWIFT |
ISBN-10 | 1-4842-2647-X / 148422647X |
ISBN-13 | 978-1-4842-2647-6 / 9781484226476 |
Haben Sie eine Frage zum Produkt? |
Größe: 7,5 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich