Learn Swift on the Mac [electronic resource] : For OS X and iOS /
Malik, Waqar.author.
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.
Contents at a Glance; Introduction; Chapter 1: Hello Swift; Improvements over Objective-C; Type Inference; Type Safety; Control Flow; Optionals; Strings; Unicode; Other Improvements; Requirements; Getting Xcode; Quick Tour of Xcode; Quick Tour of Swift; Basic Types; Aggregate Types; Control Flow; Functions; Objects; Generics; Getting the Sample Code; Summary; Chapter 2: The Swift Playground in Xcode 6; Getting Started with a Playgorund; Custom QuickLook Plugins; XCShowView; XCCaptureValue; XCPSetExecutionShouldContinueIndefinitely; Custom Modules for Playground; Importing Your Code; Summary
Chapter 3: Accessing Swift's Compiler and Interpreter: REPLWhat is REPL?; LLDB and the Swift REPL; Summary; Chapter 4: Introduction to Object-Oriented Programming; The Concept Behind OOP; Indirection and Variables; Procedural Programming; Objected Oriented Implementation; Summary; Chapter 5: Constants, Variables, and Data Types; Type Annotation; Identifiers; Console Output; Integers; Floating-Point Numbers; Numeric Literals; Conversion; Booleans; Characters; Strings; Collection Types; Arrays; Dictionaries; Tuples; Optionals; Summary; Chapter 6: Operators; Syntax; Notation; Precedence
AssociativitySwift Operators; Prefix; Infix; Bitwise Shift (precedence 160); Multiplicative (associativity left, precedence 150); Additive (associativity, left precedence 140); Range (precedence 135); Cast (precedence 132); Comparative (precedence 130); Conjunctive (associativity, left precedence 120); Disjunctive (associativity, left precedence 110); Nil Coalescing (associativity, right precedence 110); Ternary Conditional (associativity, right precedence 100); Assignment (associativity, right precedence 90); Postfix; Overloading Operators; Unary Operator; Binary Operators; Summary
Chapter 7: Flow ControlFor Loops; For-in; For-conditional-Increment; While; Do-while; Branch Statements; Switch; Range Matching; Tuples; Value Binding; String Matching; Where Clause; Control Transfer Statements; Continue; Break; Fallthrough; Return; Labeled Statements; Summary; 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 ReturnsShorthand Argument Names; Trailing Closures; Capturing Values; Summary; Chapter 9: Classes and Structures; Commonality; Definition; Accessing Properties; Value Types vs. Reference Types; Choosing Between Classes or Structures; Properties; Stored Properties; Lazy Stored Properties; Computed Properties; Property Observers; Type Properties; Summary; Chapter 10: Methods; Instance Methods; Modifying Type State; Type Methods; Summary; Chapter 11: Access Control; Modules and Source Files; Access Levels; Syntax; Classes; Subclassing; Class Members; Functions; Enumerations
Nested Types
Includes index.
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.
iOS (Electronic resource)
Mac OS
Programming languages (Electronic computers).
Programming Languages, Compilers, Interpreters.