Der Artikel wird am Ende des Bestellprozesses zum Download zur Verfügung gestellt.

Learning Swift 2 Programming

Learni Swift 2 Prog ePub _2
 Electronic book text
Sofort lieferbar | Lieferzeit: Sofort lieferbar I
ISBN-13:
9780134431628
Veröffentl:
2015
Einband:
Electronic book text
Seiten:
256
Autor:
Schatz Jacob
Serie:
Learning
eBook Typ:
PDF
eBook Format:
EPUB
Kopierschutz:
1 - PDF Watermark
Sprache:
Englisch
Beschreibung:

Get started fast with Swift 2 programming for iOS and OS XLearning Swift 2 Programming is a fast-paced, hands-on introduction to writing production-quality iOS and OS X apps with Apple's programming language. Written for developers with experience in any modern language, this book explains Swift simply and clearly, using relevant examples that solve realistic problems.Author Jacob Schatz's popular YouTube video tutorials have already helped thousands of Apple developers get started with Swift. Now, he helps you take full advantage of Swift's advanced design, remarkable performance, and streamlined development techniques.Step by step, you'll move from basic syntax through advanced features such as closures and generics-discovering helpful tips and tricks along the way. After you've mastered Swift's building blocks and learned about its key innovations, a full section of case studies walks you through building complete apps from scratch.Learn how to:
Introduction 11 Getting Your Feet Wet: Variables, Constants, and Loops 5Building Blocks of Swift 6Computed Properties (Getters and Setters) 6Using Comments 8Inference 8Merging Variables into a String 10Optionals: A Gift to Unwrap 11Printing Your Results 14Implicitly Unwrapped Optionals 14Tuples 15Number Types 16From Objective-C to Swift 17Control Flow: Making Choices 18Switching It Up: switch Statements 25Stop...Hammer Time 28Summary 292 Collecting Your Data: Arrays and Dictionaries 31Using Arrays 31Your First Array the Long Way 31A Quicker Array 32Using AnyObject 32Differences Between NSArrays and Swift Arrays 33Modifying Arrays 33Accessing Array Elements 33Adding Elements to an Array 34Removing Elements from Arrays 34Iterating Over Arrays 35Extra Bits of Arrays 35Emptying an Array 36Using Dictionaries 36Adding, Removing, and Inserting with Dictionaries 37Iterating Over Dictionaries 37Extra Bits of Dictionaries 38Emptying a Dictionary 38Testing Dictionaries for the Presence of Values 38Putting It All Together 39Summary 413 Making Things Happen: Functions 43Defining Functions 44Return Types 45Multiple Return Values 46More on Parameters 47External Parameter Names 47Default Parameter Values 48Variadic Parameters 49In-Out Parameters 50Functions as Types 51Putting It All Together 52Summary 554 Structuring Code: Enums, Structs, and Classes 57Enums 58Which Member Was Set? 59Associated Values 59Raw Values 60Structs 61Defining Methods in Structs 63Structs Are Always Copied 64Mutating Methods 65Classes 66Initialization 66What Is a Reference Type? 68Do I Use a Struct or a Class? 68Forgot Your Pointer Syntax? 69Property Observers 69Methods in Classes 70Summary 745 SpriteKit 75Introducing SpriteKit 75The SKNode and SKSpriteNode 75Creating a Game 76The New Project Screen 76The Game 85Summary 926 Reusable Code: Closures 93What Are Closures? 93Closures in Other Languages 94How Closures Work and Why They're Awesome 95The Closure Syntax 96Inferring Using Context 96Arguments Have a Shorthand, Too 97Sorting a Custom Car Class 97Closures Are Reference Types 98Automatic Reference Counting 99Strong Reference Cycles 100Trailing Closures 106Summary 1077 Creating Your Own Syntax: Subscripts and Advanced Operators 109Writing Your First Subscript 110Bits and Bytes with Advanced Operators 113Bitwise NOT 114Bitwise AND 115Bitwise OR 116Bitwise XOR 117Shifting Bits 118UInt8, UInt16, UInt32, Int8, Int16, Int32, and So On 119Value Overflow and Underflow 119Customizing Operators 120Making Your Own Operators 122Bits and Bytes in Real Life 123Summary 1278 Protocols 129Writing Your First Protocol 129Properties 131Animizable and Humanizable 134Methods 135Delegation 136Protocols as Types 138Protocols in Collections 139Protocol Inheritance 140Protocol Composition 141Protocol Conformity 143Optional Protocol Prerequisites 145Optional Chaining 146Back to Optional Protocol Requisites 148Useful Built-in Swift Protocols 149Summary 1519 Becoming Flexible with Generics 153The Problem That Generics Solve 153Other Uses for Generics 155Generics for Protocols 157The where Clause 158Summary 16210 Games with SpriteKit 163The Game 163The Setup 163Tour the Code 164The Game 164Step 1: Create the World 165Step 2: Making Things Move 176Summary 18511 Making Games with Physics 187Making a Physics-Based Game 187Creating the Project 188Adding the Assets 189Adding the Levels 189Generating the Levels 190Making a Playable Game 197Creating the Cage 199Summary 20412 Making Apps with UIKit 205Application Types 205Single-View Applications 206Creating the User Interface 208Adding Constraints 209Hooking Up the UI to Code 211Writing the Code 212The TableView 216Summary 218Index 219

Kunden Rezensionen

Zu diesem Artikel ist noch keine Rezension vorhanden.
Helfen sie anderen Besuchern und verfassen Sie selbst eine Rezension.

Google Plus
Powered by Inooga