IOS 12 programming fundamentals with swift: swift, xcode, and cocoa basics [Fifth edition] 9781492044505, 1492044504, 9781492044529, 1492044520

Move into iOS development by getting a firm grasp of its fundamentals, including the Xcode 9 IDE, Cocoa Touch, and the l

572 78 5MB

English Year 2018

Report DMCA / Copyright

DOWNLOAD FILE

IOS 12 programming fundamentals with swift: swift, xcode, and cocoa basics [Fifth edition]
 9781492044505, 1492044504, 9781492044529, 1492044520

Table of contents :
Intro
Copyright
Table of Contents
Preface
The Scope of This Book
Versions
Acknowledgments
From the Programming iOS 4 Preface
Conventions Used in This Book
Using Code Examples
Safari® Books Online
How to Contact Us
Part I. Language
Chapter 1. The Architecture of Swift
Ground of Being
Everything Is an Object?
Three Flavors of Object Type
Variables
Functions
The Structure of a Swift File
Scope and Lifetime
Object Members
Namespaces
Modules
Instances
Why Instances?
The Keyword self
Privacy
Design
Object Types and APIs
Instance Creation, Scope, and Lifetime. SelectorsChapter 3. Variables and Simple Types
Variable Scope and Lifetime
Variable Declaration
Computed Initializer
Computed Variables
Setter Observers
Lazy Initialization
Built-In Simple Types
Bool
Numbers
String
Character and String Index
Range
Tuple
Optional
Chapter 4. Object Types
Object Type Declarations and Features
Initializers
Properties
Methods
Subscripts
Nested Object Types
Instance References
Enums
Raw Values
Associated Values
Enum Case Iteration
Enum Initializers
Enum Properties
Enum Methods
Why Enums?
Structs. Struct Initializers, Properties, and MethodsStruct As Namespace
Classes
Value Types and Reference Types
Subclass and Superclass
Class Initializers
Class Deinitializer
Class Properties and Methods
Polymorphism
Casting
Casting Down
Type Testing and Casting Down Safely
Type Testing and Casting Optionals
Bridging to Objective-C
Type References
From Instance to Type
Type as Value
The Keyword Self
Comparing Types
Summary of Type Terminology
Protocols
Why Protocols?
Protocol Type Testing and Casting
Declaring a Protocol
Protocol Composition
Optional Protocol Members. Class ProtocolImplicitly Required Initializers
Literal Convertibles
Generics
Generic Declarations
Contradictory Resolution
Type Constraints
Explicit Specialization
Generic Invariance
Associated Type Chains
Where Clauses
Extensions
Extending Object Types
Extending Protocols
Extending Generics
Umbrella Types
Any
AnyObject
AnyClass
Collection Types
Array
Dictionary
Set
Chapter 5. Flow Control and More
Flow Control
Branching
Loops
Jumping
Privacy
Private and Fileprivate
Public and Open
Privacy Rules
Introspection
Operators
Synthesized Protocol Implementations.

Polecaj historie