Swift for the Really Impatient (inbunden)
Format
Häftad (Paperback)
Språk
Engelska
Antal sidor
176
Utgivningsdatum
2014-12-14
Upplaga
1
Förlag
Addison Wesley
Medarbetare
Wood, Dave
Dimensioner
232 x 180 x 10 mm
Vikt
280 g
Antal komponenter
1
ISBN
9780133960129

Swift for the Really Impatient

Foreword by Jeff LaMarche

Häftad,  Engelska, 2014-12-14
199
  • Skickas från oss inom 2-3 vardagar.
  • Fri frakt över 249 kr för privatkunder i Sverige.
Swift for the Really Impatient is the perfect jumpstart to the Swift language for every experienced Objective-C developer. Leading iOS and OS X developers Matt Henderson and Dave Wood help you take full advantage of Swifts powerful innovations, without wasting time on basics you already know.

Through expert code examples and crystal-clear explanations, Henderson and Wood reveal how Swift features improve on Objective-C and show how to make the most of them. Youll quickly master Swift-er techniques for using objects, classes, optionals, generics, functions, closures, and more. Each chapter includes hands-on exercises designed to reinforce and deepen your skills.

Youll learn how to re-implement common Objective-C programming solutions in Swift, improving code clarity, power, and performance on both desktop and mobile devices. And, because you probably wont (or cant) abandon Objective-C anytime soon, youll discover how to use both languages together, smoothly integrate Swift into existing projects and workflows, and gradually move your current code base into the future. Coverage includes
  • Using Swifts new patterns and concise, expressive syntax to produce safer, more reliable code
  • Leveraging the surprising power of Swifts data structures
  • Utilizing Swifts type system to help prevent errors common in other languages
  • Using optionals to correctly handle invalid, missing, or unknown values
  • Implementing generics to reduce duplication, improve power, and simplify maintenance
  • Interacting with C and Objective-C APIs
  • Abstracting functionality for reusable code while maintaining type safety
  • Isolating code in clean, flexible, low-overhead closures
  • Combining Swift with Objective-C in the same project
  • Avoiding gotchas when importing Objective-C classes in Swift projects
  • Nesting types to improve code clarity
  • Creating shared objects with singletons
  • Managing threading and concurrency with Swifts advanced Grand Central Dispatch (GCD) patterns

Passar bra ihop

  1. Swift for the Really Impatient
  2. +
  3. Nexus

De som köpt den här boken har ofta också köpt Nexus av Yuval Noah Harari (häftad).

Köp båda 2 för 477 kr

Kundrecensioner

Har du läst boken? Sätt ditt betyg »

Fler böcker av Matt Henderson

  • Machine Learning for Beginners 2019

    Matt Henderson

    Want to predict what your customers want to buy without them having to tell you? Want to accurately forecast sales trends for your marketing team better than any employee could ever do? Then keep reading. You’ve heard it before. The rise of ...

  • Data Science for Business 2019 (2 BOOKS IN 1)

    Riley Adams, Matt Henderson

    This book includes 2 Manuscripts: Data Analytics for Businesses 2019 + Machine Learning for Beginners 2019. Are you looking for new ways to grow your business, with resources you already have? Do you want to know how the big players like Netflix, ...

Övrig information

Matt Henderson has been developing for Apple's platforms since 2009 and is currently a Cocoa Engineer at MartianCraft. He's given several presentations at various user groups and conferences, including 360iDev, Cocoaheads Denver, and Boulder iOS Meetup. His previous experience includes leading teams on both iOS and Android projects and developing in languages ranging from Java to embedded C/C++. Dave Wood has been developing for iOS since 2008 and OS X since 2009. His experience includes developing systems that interface with stock exchanges, news outlets, and banking systems; creating newspaper sites; and building mobile apps of all kinds, from games and social networks to apps for finance, productivity, and professional development. He runs his own development studio, Cerebral Gardens, and freelances as a Cocoa Engineer for MartianCraft.

Innehållsförteckning

Foreword   xi
Preface   xiii
Acknowledgments   xv
About the Authors    xvi
Chapter 1: Introducing Swift   1
1.1 Basic Syntax   2
1.1.1 Variables and Constants   2
1.1.2 String Interpolation   5
1.1.3 Control Flow   6
1.2 Basic Data Types   10
1.2.1 Int   10
1.2.2 Double and Float   12
1.2.3 Bool   13
1.2.4 Strings   14
1.2.5 Arrays   15
1.2.6 Dictionaries   19
Exercises   20
Chapter 2: Diving Deeper into Swifts Syntax   21
2.1 Optionals   22
2.2 Generics   25
2.3 Type Annotations and Type Inference   28
2.4 Functions and Closures   29
2.4.1 Global Functions   30
2.4.2 Nested Functions   30
2.4.3 Closure Expressions   31
2.5 Tuples   32
2.6 switch Statements and Pattern Matching   34
Exercises   37
Chapter 3: Objects and Classes   39
3.1 Enumerations   41
3.2 Classes   45
3.3 Structures   49
3.4 Subclassing   51
3.5 Overloading   52
3.6 Overriding   54
3.7 Initialization   55
3.8 Properties   57
3.8.1 Computed Properties   59
3.8.2 Property Observers   60
3.8.3 lazy Properties   62
3.9 Subscripting   63
3.10 Protocols   65
3.11 Extensions   67
3.12 Access Control   68
Exercises   73
Chapter 4: Optionals   75
4.1 Optionals and nil   76
4.2 Validity Checking, Optional Binding, and Forced Unwrapping   78
4.3 Optional Chaining   81
4.4 Implicitly Unwrapped Optionals   86
Exercises   88
Chapter 5: Generics   91
5.1 Why Generics?    92
5.2 Generic Functions   92
5.2.1 Type Parameters   93
5.2.2 Using More Than One Type Parameter   94
5.3 Generic Types   94
5.3.1 Associated Types   98
5.3.2 The where Clause   100
Exercises   101
Chapter 6: Functions and Closures   103
6.1 Functions   104
6.1.1 Parameters   104
6.1.2 External Parameter Names   105
6.1.3 Default Parameter Values   107
6.1.4 Variadic and inout Parameters   108
6.1.5 Return Types   110
6.2 Closures   112
6.2.1 Inferring Parameters and the Return Value   113
6.2.2 Trailing Closures   113
6.3 Functional Programming Patterns   114
Exercises   117
Chapter 7: Working with Objective-C   119
7.1 Interacting with C and Objective-C APIs   120
7.1.1 Optional Properties and Return Values   122
7.1.2 AnyObject Types   123
7.1.3 Subclassing, Extensions, and Protocols   124
7.1.4 Automatically Converted Types   126
7.1.5 Selectors and Enums   128
7....