iOS 9 Programming Fundamentals, Table of Contents

Preface

I. Language

1. The Architecture of Swift

1.1. Ground of Being

1.2. Everything Is an Object?

1.3. Three Flavors of Object Type

1.4. Variables

1.5. Functions

1.6. The Structure of a Swift File

1.7. Scope and Lifetime

1.8. Object Members

1.9. Namespaces

1.10. Modules

1.11. Instances

1.12. Why Instances?

1.13. self

1.14. Privacy

1.15. Design

1.15.1. Object Types and APIs

1.15.2. Instance Creation, Scope, and Lifetime

1.15.3. Summary and Conclusion

2. Functions

2.1. Function Parameters and Return Value

2.1.1. Void Return Type and Parameters

2.1.2. Function Signature

2.2. External Parameter Names

2.3. Overloading

2.4. Default Parameter Values

2.5. Variadic Parameters

2.6. Ignored Parameters

2.7. Modifiable Parameters

2.8. Function In Function

2.9. Recursion

2.10. Function As Value

2.11. Anonymous Functions

2.12. Define-and-Call

2.13. Closures

2.13.1. How Closures Improve Code

2.13.2. Function Returning Function

2.13.3. Closure Setting a Captured Variable

2.13.4. Closure Preserving Its Captured Environment

2.14. Curried Functions

3. Variables and Simple Types

3.1. Variable Scope and Lifetime

3.2. Variable Declaration

3.3. Computed Initializer

3.4. Computed Variables

3.5. Setter Observers

3.6. Lazy Initialization

3.7. Built-In Simple Types

3.7.1. Bool

3.7.2. Numbers

3.7.3. String

3.7.4. Character

3.7.5. Range

3.7.6. Tuple

3.7.7. Optional

4. Object Types

4.1. Object Type Declarations and Features

4.1.1. Initializers

4.1.2. Properties

4.1.3. Methods

4.1.4. Subscripts

4.1.5. Nested Object Types

4.1.6. Instance References

4.2. Enums

4.2.1. Case With Fixed Value

4.2.2. Case With Typed Value

4.2.3. Enum Initializers

4.2.4. Enum Properties

4.2.5. Enum Methods

4.2.6. Why Enums?

4.3. Structs

4.3.1. Struct Initializers, Properties, and Methods

4.3.2. Struct As Namespace

4.4. Classes

4.4.1. Value Types and Reference Types

4.4.2. Subclass and Superclass

4.4.3. Class Initializers

4.4.4. Class Deinitializer

4.4.5. Class Properties and Methods

4.5. Polymorphism

4.6. Casting

4.7. Type Reference

4.8. Protocols

4.8.1. Why Protocols?

4.8.2. Protocol Type Testing and Casting

4.8.3. Declaring a Protocol

4.8.4. Optional Protocol Members

4.8.5. Class Protocol

4.8.6. Implicitly Required Initializers

4.8.7. Literal Convertibles

4.9. Generics

4.9.1. Generic Declarations

4.9.2. Type Constraints

4.9.3. Explicit Specialization

4.9.4. Associated Type Chains

4.9.5. Additional Constraints

4.10. Extensions

4.10.1. Extending Object Types

4.10.2. Extending Protocols

4.10.3. Extending Generics

4.11. Umbrella Types

4.11.1. AnyObject

4.11.2. AnyClass

4.11.3. Any

4.12. Collection Types

4.12.1. Array

4.12.2. Dictionary

4.12.3. Set

5. Flow Control and More

5.1. Flow Control

5.1.1. Branching

5.1.2. Loops

5.1.3. Jumping

5.2. Operators

5.3. Privacy

5.3.1. Private Declaration

5.3.2. Public Declaration

5.3.3. Privacy Rules

5.4. Introspection

5.5. Memory Management

5.5.1. Weak References

5.5.2. Unowned References

5.5.3. Weak and Unowned References in Anonymous Functions

5.5.4. Memory Management of Protocol-Typed References

II. IDE

6. Anatomy of an Xcode Project

6.1. New Project

6.2. The Project Window

6.2.1. The Navigator Pane

6.2.2. The Utilities Pane

6.2.3. The Editor

6.3. The Project File and Its Dependents

6.4. The Target

6.4.1. Build Phases

6.4.2. Build Settings

6.4.3. Configurations

6.4.4. Schemes and Destinations

6.5. From Project to Running App

6.5.1. Build Settings

6.5.2. Property List Settings

6.5.3. Nib Files

6.5.4. Additional Resources

6.5.5. Code Files and the App Launch Process

6.5.6. Frameworks and SDKs

6.6. Renaming Parts of a Project

7. Nib Management

7.1. The Nib Editor Interface

7.1.1. Document Outline

7.1.2. Canvas

7.1.3. Inspectors and Libraries

7.2. Nib Loading

7.2.1. When Nibs Are Loaded

7.2.2. Manual Nib Loading

7.3. Connections

7.3.1. Outlets

7.3.2. The Nib Owner

7.3.3. Automatically Configured Nibs

7.3.4. Misconfigured Outlets

7.3.5. Deleting an Outlet

7.3.6. More Ways to Create Outlets

7.3.7. Outlet Collections

7.3.8. Action Connections

7.3.9. More Ways to Create Actions

7.3.10. Misconfigured Actions

7.3.11. Connections Between Nibs — Not!

7.4. Additional Configuration of Nib-Based Instances

8. Documentation

8.1. The Documentation Window

8.2. Class Documentation Pages

8.3. Sample Code

8.4. Quick Help

8.5. Symbols

8.6. Header Files

8.7. Internet Resources

9. Life Cycle of a Project

9.1. Device Architecture and Conditional Code

9.1.1. Backward Compatibility

9.1.2. Device Type

9.2. Version Control

9.3. Editing and Navigating Your Code

9.3.1. Autocompletion

9.3.2. Snippets

9.3.3. Fix-it and Live Syntax Checking

9.3.4. Navigation

9.3.5. Finding

9.4. Running in the Simulator

9.5. Debugging

9.5.1. Caveman Debugging

9.5.2. The Xcode Debugger

9.6. Testing

9.7. Clean

9.8. Running on a Device

9.8.1. Running Without a Developer Program Membership

9.8.2. Obtaining a Developer Program Membership

9.8.3. Obtaining a Certificate

9.8.4. Obtaining a Development Provisioning Profile

9.8.5. Running the App

9.8.6. Profile and Device Management

9.9. Profiling

9.9.1. Gauges

9.9.2. Instruments

9.10. Localization

9.10.1. Localizing the Info.plist

9.10.2. Localizing a Nib File

9.10.3. Localizing Code Strings

9.10.4. Localizing With XML Files

9.11. Archiving and Distribution

9.12. Ad Hoc Distribution

9.13. Final App Preparations

9.13.1. Icons in the App

9.13.2. Other Icons

9.13.3. Launch Images

9.13.4. Screenshots and Video Previews

9.13.5. Property List Settings

9.14. Submission to the App Store

III. Cocoa

10. Cocoa Classes

10.1. Subclassing

10.2. Categories and Extensions

10.2.1. How Swift Uses Extensions

10.2.2. How You Use Extensions

10.2.3. How Cocoa Uses Categories

10.3. Protocols

10.3.1. Informal Protocols

10.3.2. Optional Methods

10.4. Some Foundation Classes

10.4.1. Useful Structs and Constants

10.4.2. NSString and Friends

10.4.3. NSDate and Friends

10.4.4. NSNumber

10.4.5. NSValue

10.4.6. NSData

10.4.7. Equality and Comparison

10.4.8. NSIndexSet

10.4.9. NSArray and NSMutableArray

10.4.10. NSDictionary and NSMutableDictionary

10.4.11. NSSet and Friends

10.4.12. NSNull

10.4.13. Immutable and Mutable

10.4.14. Property Lists

10.5. Accessors, Properties, and Key–Value Coding

10.5.1. Swift Accessors

10.5.2. Key–Value Coding

10.5.3. Uses of Key–Value Coding

10.5.4. KVC and Outlets

10.5.5. Key Paths

10.5.6. Array Accessors

10.6. The Secret Life of NSObject

11. Cocoa Events

11.1. Reasons for Events

11.2. Subclassing

11.3. Notifications

11.3.1. Receiving a Notification

11.3.2. Unregistering

11.3.3. Posting a Notification

11.3.4. NSTimer

11.4. Delegation

11.4.1. Cocoa Delegation

11.4.2. Implementing Delegation

11.5. Data Sources

11.6. Actions

11.7. The Responder Chain

11.7.1. Deferring Responsibility

11.7.2. Nil-Targeted Actions

11.8. Key–Value Observing

11.9. Swamped by Events

11.10. Delayed Performance

12. Memory Management

12.1. Principles of Cocoa Memory Management

12.2. Rules of Cocoa Memory Management

12.3. What ARC Is and What It Does

12.4. How Cocoa Objects Manage Memory

12.5. Autorelease Pool

12.6. Memory Management of Instance Properties

12.7. Retain Cycles and Weak References

12.8. Unusual Memory Management Situations

12.9. Nib Loading and Memory Management

12.10. Memory Management of CFTypeRefs

12.11. Property Memory Management Policies

12.12. Debugging Memory Management Mistakes

13. Communication Between Objects

13.1. Visibility by Instantiation

13.2. Visibility by Relationship

13.3. Global Visibility

13.4. Notifications and KVO

13.5. Model–View–Controller

A. C, Objective-C, and Swift

A.1. The C Language

A.1.1. C Data Types

A.1.2. C Enums

A.1.3. C Structs

A.1.4. C Pointers

A.1.5. C Arrays

A.1.6. C Functions

A.2. Objective-C

A.2.1. Objective-C Objects and C Pointers

A.2.2. Objective-C Objects and Swift Objects

A.2.3. Objective-C Methods

A.2.4. Objective-C Initializers and Factories

A.2.5. Selectors

A.2.6. CFTypeRefs

A.2.7. Blocks

A.2.8. API Markup

A.3. Bilingual Targets

Index


Back to Matt Neuburg’s Home Page

This page prepared November 3, 2015 by Matt Neuburg, phd = matt at tidbits dot com, using RubyFrontier. RubyFrontier is a port, written in the Ruby language, of the Web-site-creation features of UserLand Frontier. Works just like Frontier, but written in Ruby!
Download RubyFrontier from GitHub.