وبلاگ بلیان

Swift 2 cookbook : over 50 hands-on recipes to help you create apps and build your portfolio of projects in Swift 2

معرفی کتاب «Swift 2 cookbook : over 50 hands-on recipes to help you create apps and build your portfolio of projects in Swift 2» نوشتهٔ Begeman, Kyle، منتشرشده توسط نشر Packt Publishing در سال 2016. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است.

Over 50 hands-on recipes to help you create apps and build your portfolio of projects in Swift 2 About This Book Conceptualize and write effective applications for iOS/OS X using Swift 2 Make the most of Swift's diverse features, from configuring your projects to using design patterns and different types of databases A fast-paced, comprehensive guide equipped with lots of tips and tricks to help you learn about Swift programming quickly Who This Book Is For If you are an Apple developer who wants to use Swift to build your applications, this book is for you. With Swift 2 going open source, this book will also help web developers. Some understanding of Objective-C or Swift would be helpful but is not required. What You Will Learn Install Xcode from the App Store Upgrade your existing Swift 1.2 code to Swift 2.0 Use the standard Swift 2.0 library and collections Work with structs, generics, and design patterns in Swift Use the new markup language to provide rich documentation of code Write a book using Playgrounds and Swift Debug and test your code using Xcode Integrate your code with Objective-C and use assembly code with Swift Leverage the Objective-C runtime when compiling Swift using associated objects In Detail Swift is Apple's innovative development language that was introduced at the WWDC (WorldWide Developers Conference) 2014 alongside Xcode 6 and iOS 8. This user-friendly language is packed with modern features to make programming easier and fun, with a lot of flexibility. With Swift 2 comes even better performance, a new error handling API, protocol extensions, and super support for availability checking. This book will equip you with all the practical programming aspects of Swift 2. It covers the important features and paradigms that Swift provides to developers. You will begin by installing Xcode from the App Store and using Swift as an interpreter. Then, you will see how you can upgrade your existing Swift 1.2 code to Swift 2.0 with the help of Xcode. You will see how to use structs and generics, and work with different Design Patterns with Swift. Debug and test your code using Xcode and see how to use assembly code effectively with Swift. By the end of this book, you will have the necessary skills to get the most out of Swift to develop effective mobile and web applications. Style and approach This book follows a problem-solution methodology using step-by-step recipes, and is filled with screenshots to help you create samples and learn something new in every recipe. Cover 1 Copyright 3 Credits 4 About the Author 5 About the Reviewer 6 www.PacktPub.com 7 Table of Contents 8 Preface 12 Chapter 1: Getting Started with Xcode and Swift 18 Introduction 18 Installing Xcode from the App Store 19 Downloading the Xcode image 20 Starting a Swift project 22 Using Swift project options 27 Creating conditional code 29 Migrating an existing project to Swift 2.0 32 Adding a developer account 34 Compiling from the command line 37 Using Swift as an interpreter 39 Adding a control version system to an existing project 41 Chapter 2: Standard Library and Collections 44 Introduction 44 Creating HTML manually 45 Printing your object description 49 Quizzing the user 53 Searching for perfect numbers 60 Sorting an array of products 62 Finding the way out 66 Creating your own set 73 Organizing a dinner room 79 Chapter 3: Using Structs and Generics 90 Introduction 90 Creating an exam app 91 Checking for the right answer 96 Avoiding the copying of structs 98 Creating a generic array initializer 102 Creating a priority list 104 Creating a protocol for the priority queue 111 Chapter 4: Design Patterns with Swift 114 Introduction 114 Writing into a log file 115 Creating a factory of musical notes 122 Simulating a home automation 130 Delivering some pizzas 138 Protocol-oriented programming 144 Chapter 5: Multitasking in Your App 148 Introduction 148 Word counting using threads 148 Creating an SEO app 154 Creating a CycloneChecker app 159 Checking links of our website 165 Chapter 6: Working with Playgrounds 174 Introduction 174 Creating the first playground 175 Watching some graphics 179 Watching a temperature with color 183 Stretching an image 185 Beautifying your text using Pangrams 189 Receiving JSONs 192 Creating our own class representations 196 Rich documentation 199 Navigating pages in playgrounds 205 Chapter 7: Swift Debugging with Xcode 208 Introduction 208 Validating the values – developing a tax income simulator app 209 Debugging with Xcode and Swift – the best checker movement 215 Debugging with LLDB 227 Profiling an app 229 Error handling in Swift 2.0 235 Custom error handling in Swift 2.0 237 Availability checking in Swift 2.0 239 Chapter 8: Integrating with Objective-C 242 Introduction 242 Calling a cab 243 Hiring a van 250 Porting your code from one language to another 255 Replacing the user interface classes 257 Upgrading the app delegate 261 Creating your own custom framework 264 Chapter 9: Dealing with Other Languages 272 Introduction 272 Using my old address book 273 Compressing a message 283 Using assembly code with Swift 292 Sharing C++ code with Swift 296 Chapter 10: Data Access 304 Introduction 304 Creating an SQLite database 305 Checking where your IP is from 311 Tracking your phone activity 319 Controlling your stocks 326 Designing a voting device using CouchDB 335 Chapter 11: Extensions, Photos, and More 344 Introduction 344 Developing the geekiest keyboard 344 Time to take your pill 352 Adding effects to your photos 359 Being a film critic 363 Leaving breadcrumbs 377 Creating the Currency Converter app 382 Method swizzling in Swift 391 Associated objects in Swift 393 Index 396

Over 50 hands-on recipes to help you create apps and build your portfolio of projects in Swift 2

About This Book

  • Conceptualize and write effective applications for iOS/OS X using Swift 2
  • Make the most of Swift's diverse features, from configuring your projects to using design patterns and different types of databases
  • A fast-paced, comprehensive guide equipped with lots of tips and tricks to help you learn about Swift programming quickly

Who This Book Is For

If you are an Apple developer who wants to use Swift to build your applications, this book is for you. With Swift 2 going open source, this book will also help web developers. Some understanding of Objective-C or Swift would be helpful but is not required.

What You Will Learn

  • Install Xcode from the App Store
  • Upgrade your existing Swift 1.2 code to Swift 2.0
  • Use the standard Swift 2.0 library and collections
  • Work with structs, generics, and design patterns in Swift
  • Use the new markup language to provide rich documentation of code
  • Write a book using Playgrounds and Swift
  • Debug and test your code using Xcode
  • Integrate your code with Objective-C and use assembly code with Swift
  • Leverage the Objective-C runtime when compiling Swift using associated objects

In Detail

Swift is Apple's innovative development language that was introduced at the WWDC (WorldWide Developers Conference) 2014 alongside Xcode 6 and iOS 8. This user-friendly language is packed with modern features to make programming easier and fun, with a lot of flexibility. With Swift 2 comes even better performance, a new error handling API, protocol extensions, and super support for availability checking.

This book will equip you with all the practical programming aspects of Swift 2. It covers the important features and paradigms that Swift provides to developers. You will begin by installing Xcode from the App Store and using Swift as an interpreter. Then, you will see how you can upgrade your existing Swift 1.2 code to Swift 2.0 with the help of Xcode. You will see how to use structs and generics, and work with different Design Patterns with Swift. Debug and test your code using Xcode and see how to use assembly code effectively with Swift.

By the end of this book, you will have the necessary skills to get the most out of Swift to develop effective mobile and web applications.

Style and approach

This book follows a problem-solution methodology using step-by-step recipes, and is filled with screenshots to help you create samples and learn something new in every recipe.

دانلود کتاب Swift 2 cookbook : over 50 hands-on recipes to help you create apps and build your portfolio of projects in Swift 2