Index
A
- abstract factory pattern / The abstract factory pattern
- access control
- about / Access control
- private level / Access control
- internal level / Access control
- public level / Access control
- array
- about / Arrays
- arrays
- enhancing / Enhancing arrays
- associated values
- using / Using associated values effectively
- class hierarchies, replacing / Replacing class hierarchies
- state, representing / Concisely representing a state
- associated values, enumeration
- about / Associated values
- Automatic Reference Counting (ARC)
- about / Automatic reference counting
- object relationships / Object relationships
B
- basic concepts
- implementing / Bringing it all together
- basic functions
- about / Basic functions
- behavioral patterns
- about / Behavioral patterns
- iterator pattern / The iterator pattern
- observer pattern / The observer pattern
- blog posts
- about / Forums and blogs
- using / Blog posts
- bridging header / A bridging header
- built-in function, functional programming
- filter function / The filter function
- reduce function / The reduce function
- map function / The map function
- sorted function / The sorted function
- advantages / How these affect the state and nature of code
C
- camera app
- conceptualizing / Conceptualizing the app
- features / Features
- interface / The interface
- data / Data
- project, setting up / Setting up the app project
- photo, capturing / Allowing picture taking
- photo, saving temporarily / Temporarily saving a photo
- photo grid, populating / Populating our photo grid
- photo, saving permanently / Permanently saving a photo
- case
- about / Switches
- casting
- about / Casting
- upcasting / Upcasting
- downcasting / Downcasting
- classes
- about / Classes, Classes
- inheriting, from another class / Inheriting from another class
- initializer / Initialization
- methods, overriding / Overriding methods and computed properties, Methods
- computed properties, overriding / Overriding methods and computed properties, Computed properties
- casting / Casting
- basic class / The basic class
- initializers / Initializers
- properties / Properties
- methods / Methods
- inheritance / Inheritance
- closed range / Loops
- closures
- about / Closures
- as variables / Closures as variables
- as parameters / Closures as parameters
- syntax / Syntactic sugar
- command-line tool project
- creating / Projects
- command-line Xcode project, setting up / Setting up a command-line Xcode project
- external file, creating / Creating and using an external file
- external file, using / Creating and using an external file
- interfacing, with code from other files / Interfacing with code from other files
- file organization / File organization and navigation
- navigation / File organization and navigation
- compiler
- about / Understanding playgrounds
- composite pattern
- about / The composite pattern
- hierarchies / Hierarchies
- subclassing, alternatives / An alternative to subclassing
- computed properties
- about / Computed properties
- overriding / Computed properties
- conditionals
- about / Conditionals
- if statement / Conditionals
- constants
- about / Constants and variables
- constants, Objective-C
- about / Constants and variables
- value types / Value types
- reference types / Reference types
- containers
- about / Containers
- tuples / Tuples
- arrays / Arrays
- dictionaries / Dictionaries
- containers, Objective-C
- about / Containers
- arrays / Arrays
- dictionaries / Dictionaries
- control flow
- about / Control flow
- conditionals / Conditionals
- switches / Switches
- loops / Loops
- control flow, Objective-C
- about / Control flow
- conditionals / Conditionals
- switches / Switches
- loops / Loops
- convenience initializer
- core types, Swift
- about / Core Swift types
- constants / Constants and variables
- variables / Constants and variables
- containers / Containers
- coupling / An alternative to subclassing
- creational patterns
- about / Creational patterns
- shared instance pattern / A singleton/shared instance
- singleton pattern / A singleton/shared instance
- abstract factory pattern / The abstract factory pattern
- curried functions
- about / Curried functions
- example / Curried functions
- using / Curried functions
- custom initialization
- about / Custom initialization
D
- data storage
- about / How data is stored in a computer
- filesystem / How data is stored in a computer
- memory / How data is stored in a computer, Memory
- declarative code
- versus imperative code / Declarative versus imperative code
- about / Declarative versus imperative code
- designated initializer
- design patterns
- about / What is a design pattern?
- complexity / What is a design pattern?
- coupling / What is a design pattern?
- cohesion / What is a design pattern?
- behavioral patterns / Behavioral patterns
- structural patterns / Structural patterns
- creational patterns / Creational patterns
- development environment
- setting up / Setting up the development environment
- dictionaries
- enhancing / Enhancing dictionaries
- dictionary
- about / Dictionaries
- documentation, Apple
- about / Apple's documentation
- using / Apple's documentation
- downcasting
- about / Downcasting
E
- enumeration
- about / Enumerations
- declaration / Basic declaration
- values, testing / Testing enumeration values
- raw values / Raw values
- associated values / Associated values
- methods / Methods and properties
- properties / Methods and properties
- existing generics
- extending / Extending the existing generics
- arrays, enhancing / Enhancing arrays
- dictionaries, enhancing / Enhancing dictionaries
- extensions
- about / Extensions
- defining / Extensions
F
- filesystem
- about / Filesystem
- filter function
- about / The filter function
- for-in loops / Loops
- forced unwrapping
- about / Forced unwrapping
- forums
- about / Forums and blogs
- using / Forums
- Foundation Framework
- about / Bringing it all together
- functional programming
- state / State and side effects
- side effects / State and side effects
- declarative code, versus imperative code / Declarative versus imperative code
- built-in function / Building blocks of functional programming in Swift
- functions
- about / Functions
- basic functions / Basic functions
- parameterized functions / Parameterized functions
- that return values / Functions that return values
- with default arguments / Functions with default arguments
- functions, Objective-C
- about / Functions
- using / Using functions
- types, using / Using types
- containers, using / Containers
- reference type translation / Reference type translation
G
- generators
- GeneratorType protocol
- implementing / Generators
- generic
- about / Defining a generic
- defining / Defining a generic
- function / The generic function
- type / The generic type
- type constraints / The generic type
- getter method
- about / Computed properties
I
- imperative code
- versus declarative code / Declarative versus imperative code
- about / Declarative versus imperative code
- implicitly unwrapped optional
- about / Implicitly unwrapped optionals
- inheritance
- about / Classes
- initializer
- about / Initialization
- overriding initializer / Overriding initializers
- required initializer / Required initializers
- convenience initializer / Designated and convenience initializers
- designated initializer / Designated and convenience initializers
- instances
- versus types / Types versus instances
- Instruments / Spotting
- Interface Builder
- about / Implicitly unwrapped optionals
- iterator pattern / The iterator pattern
L
- lazy evaluation
- about / Lazy evaluation
- lazy properties
- about / Lazy properties
- unnecessary memory usage, avoiding / Avoiding unnecessary memory usage
- unnecessary processing, avoiding / Avoiding unnecessary processing
- logic, localizing to concerned property / Localizing logic to the concerned property
- Leaks / Spotting
- learning process / Learning with this book
- loops
M
- map function
- about / The map function
- member methods
- about / Member and static methods
- memory
- about / Memory
- methods
- overriding / Methods
- Model-View-Controller
- refactoring / Refactoring to respect Model-View-Controller
- model view controller
- about / Model-View-Controller
- benefits / Model-View-Controller
N
- nil coalescing
- about / Nil coalescing
O
- Objective-C
- relationship, with Swift / Swift's relationship with Objective-C
- background / The history of Objective-C
- constants and variables / Constants and variables
- containers / Containers
- control flow / Control flow
- functions / Functions
- types / Types
- projects / Projects
- Objective-C code
- calling, from Swift / Calling Objective-C code from Swift
- bridging header / A bridging header
- object relationships
- about / Object relationships
- strong relationship / Strong relationships
- weak relationship / Weak relationships
- unowned relationship / Unowned relationships
- objects
- losing / Lost objects
- losing, between objects / Between objects
- losing, with closures / With closures
- observer pattern
- about / The observer pattern
- callback property / The callback property
- notification center / The notification center
- open range / Loops
- optional binding
- about / Downcasting, Optional binding
- optional chaining
- about / Optional chaining
- optionals
- using / Introducing optionals
- unwrapping / Unwrapping an optional
- implicitly unwrapped optional / Implicitly unwrapped optionals
- debugging / Debugging optionals
- implementation / The underlying implementation
- overriding initializer
- about / Overriding initializers
P
- parameterized functions
- about / Parameterized functions
- parameter naming pattern
- for functions / Custom initialization
- for methods / Custom initialization
- for initializers / Custom initialization
- parameters
- about / Basic functions
- photo
- capturing / Allowing picture taking
- saving temporarily / Temporarily saving a photo
- saving permanently / Permanently saving a photo
- photo grid
- populating / Populating our photo grid
- playground
- about / Understanding playgrounds
- podcasts
- pointer / Reference types
- printing to console process
- about / Printing on the console
- println function
- about / Basic functions
- projects, Objective-C / Projects
- header files / Header files
- implementation file / An implementation file
- organization / Organization
- prominent figures
- following / Prominent figures
- reference link / Prominent figures
- properties
- about / Properties
- property changes
- reacting to / Reacting to property changes
- protocol
- about / Protocols
- defining / Defining a protocol
- implementing / Implementing a protocol
- type aliases, using / Using type aliases
- constraints / Protocol constraints
- where clauses / Where clauses for protocols
- GeneratorType protocol, implementing / Generators
- SequenceType protocol, implementing / Sequences
- Fibonacci math problem, solving / Product of Fibonacci numbers under 50
R
- raw values, enumeration
- about / Raw values
- reduce function
- about / The reduce function
- reference types
- versus value types / Value types versus reference types
- about / Determining a value or reference type
- determining / Determining a value or reference type
- behavior on assignment / Behavior on assignment
- behavior on input / Behavior on input
- capture behavior, of closure / Capturing behavior of closure
- capture behavior, of Closure / Capturing behavior of closure
- required initializer
- about / Required initializers
S
- scope
- about / Scope
- defining / How is scope defined
- nested types / Nested types
- separation of concerns
- sequences
- SequenceType protocol
- implementing / Sequences
- setter method
- about / Computed properties
- shared instance pattern / A singleton/shared instance
- side effects, functional programming
- about / State and side effects
- singleton pattern / A singleton/shared instance
- sorted function
- about / The sorted function
- Stack Overflow
- state, functional programming
- about / State and side effects
- stateless function
- about / State and side effects
- static methods
- about / Member and static methods
- string interpolation
- about / Printing on the console
- String type
- about / Swift's type system
- strong reference cycle
- about / Strong reference cycles
- with closures / With closures
- strong reference cycle, between objects
- spotting / Spotting
- fixing / Fixing the cycles
- strong reference cycle, with closures
- strong relationship
- about / Strong relationships
- structural patterns
- about / Structural patterns
- composite pattern / The composite pattern
- structure
- about / Structs
- types, versus instances / Types versus instances
- properties / Properties
- member methods / Member and static methods
- static methods / Member and static methods
- computed properties / Computed properties
- property changes, reacting to / Reacting to property changes
- subscripts / Subscripts
- custom initialization / Custom initialization
- subscripts
- about / Subscripts
- Swift
- about / Defining our goals for this book
- goals, defining / Defining our goals for this book
- development environment, setting up / Setting up the development environment
- core types / Core Swift types
- type system / Swift's type system
- relationship, with Objective-C / Swift's relationship with Objective-C
- Objective-C code, calling / Calling Objective-C code from Swift
- Swift code
- running / Running our first Swift code
- switch
- system types
- extending / Extending system types to reduce code
T
- tuple
- about / Tuples
- type aliases
- about / Using type aliases
- using / Using type aliases
- type constraints
- about / Type constraints
- protocol constraints / Protocol constraints
- where clauses, for protocols / Where clauses for protocols
- where clauses, for equality / Where clauses for equality
- type inference
- about / Swift's type system
- types
- versus instances / Types versus instances
- types, Objective-C
- structures / Structures
- enumerations / Enumerations
- classes / Classes
- categories / Categories
- protocols / Protocols
- blocks / Blocks
- type system, Swift
- about / Swift's type system
U
- UIImagePickerController class / Allowing picture taking
- UIKit
- about / Implicitly unwrapped optionals
- unowned relationship
- about / Unowned relationships
- unwrap, optionals
- about / Unwrapping an optional
- optional binding / Optional binding
- forced unwrapping / Forced unwrapping
- nil coalescing / Nil coalescing
- upcasting
- about / Upcasting
- user interface
- configuring / Configuring the user interface
- running / Running the app
V
- value types
- versus reference types / Value types versus reference types
- about / Determining a value or reference type
- determining / Determining a value or reference type
- behavior on assignment / Behavior on assignment
- behavior on input / Behavior on input
- capture behavior, of closure / Capturing behavior of closure
- capture behavior, of Closure / Capturing behavior of closure
- variables
- about / Constants and variables
- variables, Objective-C
- about / Constants and variables
- value types / Value types
- reference types / Reference types
- views / Hierarchies
W
- weak relationship
- about / Weak relationships
- where clauses
- for protocols / Where clauses for protocols
- for equality / Where clauses for equality
- while loop / Loops
X
- Xcode
- download link / Setting up the development environment