Struct = value type. Instance keeps unique copy of data.
Class = reference type.
Back
Key-Value Observing
Front
Attaches code to variables so that when variable changes the code runs.
Back
Rect vs Frame
Front
??
Back
Garbage Collecting in Swift
Front
Uses automatic reference counting: form of garbage collection which deallocates objects once there are no more references.
Back
Repeat
Front
Runs logic in block before while statement is processed.
Back
Default vs Ephemeral URLSession call
Front
??
Back
Stack vs Heap
Front
STACK is used for static memory allocation (instance data known at compile time and size fixed when program starts). Uses LIFO, faster.
Heap for dynamic memory allocation (instance data and lifetime is configurable).
Back
Final
Front
Used to mark objects that cannot be inherited from.
Back
Property
Front
Stores data in instance of class.
Back
What happens if you wrap an "if let" on an unwrapped property?
Front
Won't compile.
Back
Float vs Double
Front
Doubles are more precise (14 digits of precision vs 7)
Back
viewDidAppear vs viewDidLoad
Front
viewDidLoad is called when view is loaded in memory, Appear is called every time it appears.
Back
Static Method
Front
Static methods are defined in an object but do not require instance data. Therefore, they can be called directly with the class name, such as Math.random().
Back
View vs Layer
Front
Layers manage visual content and are the backing store for views. If a layer is created by a view, the view assigns itself as the delegate.