Book description
There's a new language in town. Swift is Apple's new, native, fast, and easy to learn programming language for iOS and OS X app development. It's their "Objective-C without the C". If you are an iOS developer or planning to become one, learning Swift is your #1 priority, and Learn Swift on the Mac tells you everything you need to get up to speed, well, swiftly.
You'll start with the Swift Playground and an introduction to object-oriented programming so you can immediately see Swift in action. You then learn about all of the key language features like functions and closures, classes, methods, extensions, and how Swift works just as well as Objective-C when it comes to easy memory management with ARC.
Finally you'll learn how to use Swift alongside Objective-C as well as with Core Data, and you'll learn how to put all of the pieces together with a health app using Apple's new HealthKit framework.
Table of contents
- Cover
- Title
- Copyright
- Dedication
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
- Chapter 1: Hello Swift
- Chapter 2: The Swift Playground in Xcode 6
- Chapter 3: Accessing Swift’s Compiler and Interpreter: REPL
- Chapter 4: Introduction to Object-Oriented Programming
- Chapter 5: Constants, Variables, and Data Types
- Chapter 6: Operators
- Chapter 7: Flow Control
-
Chapter 8: Functions and Closures
- Defining Functions
- Calling a Function
- Parameter Names
- Default Values
- Variadic Parameters
- Mutablity of Parameters
- In-Out Parameters
- Function Types
- Functions as Parameters
- Functions as Return Values
- Nested Functions
- Closures
- Closure Syntax
- Inferring Types from Context
- Implicit Returns
- Shorthand Argument Names
- Trailing Closures
- Capturing Values
- Summary
- Chapter 9: Classes and Structures
- Chapter 10: Methods
- Chapter 11: Access Control
- Chapter 12: Inheritance
- Chapter 13: Extensions
- Chapter 14: Memory Management and ARC
- Chapter 15: Protocols
- Chapter 16: Generics
- Chapter 17: Expressions
- Chapter 18: Interoperability with Objective-C
- Chapter 19: Mix and Match
- Chapter 20: Working with Core Data
- Chapter 21: Consuming RESTful Services
- Chapter 22: Developing a Swift-Based Application
- Index
Product information
- Title: Learn Swift on the Mac: For OS X and iOS
- Author(s):
- Release date: March 2015
- Publisher(s): Apress
- ISBN: 9781484203767
You might also like
book
Learn Swift 2 on the Mac, Second Edition
Swift is Apple's new, native, fast, and easy to learn programming language for iOS, watchOS, tvOS …
book
Running Mac OS X Tiger
Running Mac OS X Tiger is the ideal resource for power users and system administrators like …
book
Learning Objective-C 2.0: A Hands-on Guide to Objective-C for Mac and iOS Developers, Second Edition
Get Started Fast with Objective-C 2.0 Programming for OS X Mountain Lion, iOS 5.1, and Beyond …
book
Effective Objective-C 2.0: 52 Specific Ways to Improve Your iOS and OS X Programs
Write Truly Great iOS and OS X Code with Objective-C 2.0! will help you harness all …