Title: Theory / Important / CS / Programming / Objective-C / Documentation / General
Tags: automatedNewLineAfterCommaSpace

Name: An object
Definition: An instance of a class
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Context: Objective-C

Typ: NSNumber
Meaning: Class representing a number object
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C

Name: A class interface
Definition: how a given type of object is intended to be used by other object
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Context: Objective-C

Name: An immutable object
Definition: An object whose content can't change after creation
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Context: Objective-C

Instruction: @interface SubClass : ParentClass <Protocol_1, ..., Protocol_n>
 foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Meaning: Introduce a class inheriting from ParentClass, with content foo, and satisfying protocols Protocol_i
Language: Objective-C
Identifier: SubClass

Instruction: @property (
  parameter_1,
  ...,
  parameter_n
) type var;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Meaning: introduce an element in the current class datastructure,
  with parameters parameter_i
Language: Objective-C
Context: class definition
Identifier: var
Typ: type

Typ: T*
Meaning: A C-pointer to an object of type T
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Context: class definition

Instruction: readonly
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Meaning: only this object can change the value associated to name
Language: Objective-C
Context: @property type name;

Instruction: -(returnType)
methodNamePart_1:(typeArg_1)param_1
...
methodNamePart_n:(typeArg_n)param_n;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Meaning: Introduce an object method, returning type ReturnType with i-th parameter of type typeArg_i
Language: Objective-C
Context: class definition
Identifier: methodNamePart_1 ... methodNamePart_n

Instruction: (returnType)methodNamePart_1:(typeArg_1)param_1 ... methodNamePart_n:(typeArg_n)param_n;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Meaning: Introduce a class method, returning type ReturnType with i-th parameter of type typeArg_i
Language: Objective-C
Context: class definition
Identifier: methodNamePart_1 ... methodNamePart_n

Extension: m
Means: objective-C implementation
Other fields (not shown on cards):
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html

Question: Difference between Objective-C #import and C #include
Answer: #import ensure that a file is imported only once
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Context: objective-C

Instruction: #import "file"
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: preprocessor include "file" if it was not already imported
Language: objective-C

Instruction: @implementation Class
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: State that the interface named Class is implemented as in foo
Language: objective-C

Instruction: [object
  methodNamePart_1:value_1 ... methodNamePart_n:value_n;
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: call the method
methodNamePart_1 ... methodNamePart_n
of object, with values value_i associated to methodNamePart_i
Language: objective-C

Instruction: type var = value;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: objective-C
Context: method
Identifier: var
Typ: type
Initialization: value

Instruction: return foo;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: Halt the method and foo to the caller
Language: objective-C
Context: method
Typ: type

Name: Automatic reference conuting
Definition: (garbage collector?)
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Context: Objective-C
Abbreviation: ARC

Instruction: super
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Context: method
Returns: the object, but as an instance of the parent type

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Syntactic sugar: id
Implementation: NSObject*
Language: Objective-C

Instruction: [Class alloc]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: An id, with enough room to store an object of Class, all values initialized to 0

Instruction: [c init]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: an id, with the object initialized correcty for class c
Variables: Class* c

Instruction: [[C alloc] init]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: an id, pointing to an initialized object of type C
Abbreviation: [C new]

Typ: BOOL
Meaning: YES or NO
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C

Instruction: @YES @NO
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: The NSNumber* representing the true bool

Instruction: [NSNumber
  numberWithType:foo
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: The NSNumber* representing the number number
Abbreviation: @number

Instruction: @numbersuffix
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: The NSNumber* representing the number number, with actual type as in suffix

Instruction: foo == bar
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: Whether foo are the same pointer
Variables: id foo bar

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Syntactic sugar: Class* var;
Implementation: Class* var = nil;
Language: Objective-C

Instruction: nil
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: a value of any type Class*, which accept all methods and always return default value (0, NO, or nil)

Instruction: if (cond) {
  YES_CASE
} else {
  NO_CASE
}
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: if cond is 0, NO, nor nil, evaluates NO_CASE; otherwise evaluates YES_CASE
Language: Objective-C

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Syntactic sugar: if (cond) {
  YES_CASE
}
Implementation: if (cond) {
  YES_CASE
} else {
}
Language: Objective-C

Instruction: !foo
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: whether foo is 0, NO or nil

Instruction: [o propName]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Language: Objective-C
Returns: The value associated to propName in o
Variables: C a class
propName a property of C
o an instance of C
Abbreviation: o.propName

Instruction: [o
  setPropName:value
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/DefiningClasses/DefiningClasses.html
Effect: set propName of o to value
Language: Objective-C
Variables: C a class
propName a property of C
o an instance of C
Abbreviation: o.propName = value

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Syntactic sugar: @property type name;
Implementation: @property (readwrite) type name;
Language: Objective-C

Instruction: getter=getterName
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: the getter is called getterName
Language: Objective-C
Context: @property type varName;

Variable: o.propName
Meaning: The value associated to propName in o
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Context: @property type propName;
Language: Objective-C
Variables: C a class
propName a property of C
o an instance of C

Variable: _propName
Meaning: The instance variable containing the value of property PropName
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Context: @property type propName;
Language: Objective-C
Variables: C a class
propName a property of C
o an instance of C

Question: Difference between property and instance variable
Answer: Property describes the semantic of the value in the object, it is what is publicly seen. Instance variable describe the implementation and allow direct access
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Variables: C a class
propName a property of C
o an instance of C
Context: Objective-C

Question: When is it legitimate to directly access instance variable in a class code
Answer: when writing initialization, deallocation or custom accessor methods
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Variables: C a class
propName a property of C
o an instance of C
Context: Objective-C

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Syntactic sugar: @synthetize varName;
Implementation: @synthetize varName = varName;
Language: Objective-C
Variables: C a class

Instruction: @synthetize propName = instanceVarName;
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: Declare a property propName backed by instanceVarName
Language: Objective-C
Variables: C a class

Name: The designated initializer
Definition: The initializer with the most arguments. Called by other initializers to initialize the code
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Context: objective-C

Question: How to create a read-only property without instance variable
Answer: Create a method taking no argument and returning the value
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Context: objective-C

Instruction: nonatomic
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: getter (and setter if created) do not check that the action is atomic. In case of multithreaded code, a setter may conflict with another setter or a getter
Language: objective-C
Context: property declaration

Name: a has strong reference to b
Definition: a has a pointer to b and b should not be destructed as long as a must live
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Variables: a, b objects
Context: objective-C

Name: a has weak reference to b
Definition: a has a pointer to b but b can still be destroyed while a exists
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Variables: a, b objects
Context: objective-C

Instruction: weak
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Language: objective-C
Context: property declaration
Returns: The current class do not take ownership of the declared property. The property can be switched to nil any time

Instruction: __weak
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Language: objective-C
Context: local declaration
Returns: The declared variable is weak

Question: How to use a weak property/variable
Answer: Assign the property/variable to a strong property/variable, check whether it is not nil, then use it. It ensures that it won't be deallocated between test and usage
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Context: objective-C

Instruction: unsafe_unretained
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: the declared property can be deallocated but won't be set to nil. Accessing it will crash
Language: Objective-C

Instruction: copy
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: When a value is assigned to this property, the value is copied instead of being a shared reference
Language: Objective-C

Instruction: @interface ClassName (CategoryName)
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
Meaning: Extend ClassName with class and object method, property (but not instance variable) as declared in foo
Language: Objective-C
Identifier: CategoryName
Name: Category

Instruction: @implementation ClassName (CategoryName)
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
Language: Objective-C
Returns: Instances of ClassName now has methods as implemented by foo

Question: What occurs if a category had a method with a name already introduced in the class, its ancestor or another category
Answer: One of the method with the name is called, which one is undefined behavior
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
Context: objective-C

Question: How to avoid method name clash in category
Answer: Prefix your method name by a fixed prefix determined by your category
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
Context: objective-C

Instruction: @interface ClassName ()
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html
Effect: Behaves as if foo was in the interface defining ClassName
Language: How to avoid method name clash in category
Context: objective-C
Assuming: Must be compiled at same time than ClassName
Name: class extension
Intuition: Allow to add private properties and members, that are not known by class importing ClassName.h

Instruction: @protocol ProtocolName
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Meaning: Introduce a protocol that must contains all methods defined in foo
Language: objective-C
Identifier: ProtocolName

Typ: T* <protocol>
Meaning: Pointer to an instance of T satisfying protocol
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Language: Objective-C

Instruction: @optional
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Effect: methods declared below are not mandatory for Protocol
Language: Objective-C
Context: Protocol

Instruction: @required
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Effect: methods declared below are mandatory for Protocol
Language: Objective-C
Context: Protocol

Instruction: [obj
  respondsToSelector:@selector(methodName:)
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Language: Objective-C
Context: Protocol
Returns: whether obj has method methodName

Instruction: @protocol MyProtocol <ParentProtocol>
  foo
@end
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Meaning: the declared protocol inherits from ParentProtocol. Any class respecting this protocol must respect ParentProtocol too
Language: Objective-C
Context: Protocol

Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html
Syntactic sugar: @interface SubClass : ParentClass
 foo
@end
Implementation: @interface SubClass : ParentClass <>
 foo
@end
Language: Objective-C
Context: Protocol

Typ: NSValue
Meaning: A box containing a basic C scalar type/pointer
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C

Name: Class cluster
Definition: An abstract class that is implemented by many concrete subclass
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Context: Objective-C

Instruction: [NSValue
  value:&name
  withObjCType:@encode(structName)
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C
Returns: An objective-C encoding of the C-structure structName's value's of var
Variables: typedef struct {structDef} structName;
struct structName var;

Instruction: [NSNull
  null
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C
Returns: Represents null as a NSObject

Typ: NSSet
Meaning: An immutable set of NSObject
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C

Instruction: [NSSet
  setWithObjects:object_1, .., object_n, nil
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C
Returns: A NSset with object_1 ... and object_n

Typ: NSNull
Meaning: The singleton type with a null object
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C
Subtype of: [dict objectForKey:key]

Instruction: [foo
  writeToUrl:foo
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Effect: write foo to file foo
Language: Objective-C
Returns: whether the operation was sucessful

Typ: NSCoding
Function: encodeWithCoder
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Function2: initWithCoder
Language: Objective-C

Typ: NSFastEnumeration
Function: allow to use for-in loop
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C

Instruction: for (type var in set) {
  foo
}
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Effect: for each element var in set, execute foo,
Language: Objective-C
Variables: NSFastEnumeration set

Instruction: [enumerator nextObject]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/FoundationTypesandCollections/FoundationTypesandCollections.html
Language: Objective-C
Returns: An object from the enumerator not yet returned
Variables: NSEnumerator enumerator

Question: Best practice with functions taking blocks as argument
Answer: Only one block and it is the last argument
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html

Question: What to do if a block type is often used
Answer: Use typedef to give a name to this type
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html

Question: Best practice with properties that are block
Answer: write explicitly (copy)
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html

Name: A concurrent queue
Definition: A queue of tasks starting as many tasks as possible concurrently
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Example: Executing each step of a loop concurrently, when they are independant

Typ: NSOperation
Meaning: A task to be executed when possible by the system
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C

Typ: NSOperationQueue
Meaning: A queue of NSOperation
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C

Instruction: [NSBlockOperation
  blockOperationWithBlock:foo
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C
Returns: A NSBlockOperation that executes foo()
Typ: NSBlockOperation

Instruction: [NSOperationQueue mainQueue]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C
Returns: The main queue

Instruction: [[NSOperationQueue alloc] init]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C
Returns: A new Operation queue

Typ: NSError
Meaning: Errors
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C

Typ: UIAlertView
Meaning: iOS class used to present errors to user
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C

Instruction: [responder
  presentError:error
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Effect: Show the error to the user
Language: Objective-C
Variables: NSResponder responder

Question: What is the form of an error domain
Answer: com.companyName.appOrFrameworkName.ErrorDomain
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Instruction: [NSError
  errorWithDomain:domain
  code:number
  userInfo:message
]
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C
Returns: An error for domain, with number and message

Typ: NSException
Meaning: An exception the program can catch and deal with
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Language: Objective-C

Instruction: @try {
  first
}
@catch (NSException *exception) {
  exceptionCase
}
@finally {
  last
}
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Effect: Run first. If it throws an exception, call it exception and call exceptionCase. Then run last
Language: Objective-C

Question: How to deal with exception
Answer: Avoid them as much as possible. Check as much as possible first whether an action can be done safely
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Question: What is the name standard for names
Answer: camelCase
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C
Answer2: Class have prefix related to the tools that defines them

Name: AB prefix
Definition: Prefix for Address book
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Name: CA prefix
Definition: Prefix for Core Animation
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Name: CI prefix
Definition: Prefix for Core image
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Name: UI prefix
Definition: Prefix for UIKit (iOS)
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Name: NS prefix
Definition: Core Objective-C prefix
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Question: What must be the name of factory method
Answer: start with the name of the class (without the prefix) that they create, with the exception of subclasses of classes with existing factory methods
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html
Context: Objective-C

Extension: mm
Description: objective c++

Name: View
Definition: a portion of a window that you want to fill with some content
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Question: What are the responsabilities of a parent view over its children
Answer: Placing and sizing the children
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Typ: UIWindow
Meaning: An IOs window, handling the overall presentation of your application's user interface
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Language: Objective-C
Context: iOS
Name: A window

Name: Animations
Definition: provide users with visible feedback about changes to your view hierarchy
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Name: Interface builder
Definition: an application that you use to graphically construct and configure your application’s windows and views
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Typ: CALayer
Meaning: manages the backing store for the view and handles view-related animations
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Language: Objective-C
Context: iOS
Name: Core Animation layers

Name: The superview of V
Definition: The view containing V
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Variables: View V
Context: iOS

Name: A subview of V
Definition: The view contained in V
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Question: When two views are superposed, how is the content rendered
Answer: A subview hides its superview
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS
Answer2: For sibling views, the one at the end of the array is the one rendered

Question: How does IOs avoid cost of recomputing rendering
Answer: Saving a snapshot of views, and reusing it as much as possible
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Question: Why does the system does not redraw views immediately after they are changed
Answer: multiple change may occur at the same time. A partial view would be immediately discarded
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
Context: iOS

Variable: view.contentMode
Meaning: What to do with view content when the view size change
Page: https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/Introduction/Introduction.html
https://developer.apple.com/documentation/uikit/uiview/1622619-contentmode?language=objc
Context: iOS
Language: Objective-C
Variables: UIView view

Name: Toll-free bridged class
Definition: A NS class that is exactly the same as a Core Foundation class, and can be used interchangeably
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Toll-FreeBridgin/Toll-FreeBridgin.html#//apple_ref/doc/uid/TP40010810-CH2

Question: When is it better to inherits instead than embedding
Answer: If the derived class needs to manage its memory
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ClassClusters/ClassClusters.html
Name: Toll-free bridged class

Question: When is it better to embeds instead of inherits
Answer: when you need to capture a call but use the same memory storage
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ClassClusters/ClassClusters.html
Name: Toll-free bridged class

Name: A true subclass of Cl
Definition: A subclass of the cluster's abstract superclass
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ClassClusters/ClassClusters.html
Variables: Cl a cluster
Context: Objective C
Definition2: Declare its own storage
Definition3: override all initializer methods of the superclass
Definition4: override the superclass's primitive methods

Name: A primitive method
Definition: A method that directly access the object's instance variable
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ClassClusters/ClassClusters.html
Context: Objective C

Name: A class factory method
Definition: A class method that combine allocation and initialization in one step
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/ClassFactoryMethods/ClassFactoryMethods.html
Context: Objective C

Name: Introspection
Definition: The capacity of an object to divulge details about themselves as objects at runtime
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Introspection/Introspection.html
Context: Objective C

Question: How to check for equality for class Cl in Objective-C
Answer: `isEqualToCl:(Cl*)aCl` that checks for equality between `Cl` objects
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Introspection/Introspection.html
Context: Objective C
Answer2: `isEqual:(id)other` that check whether `other` has correct type, and if so delegates to `isEqualToCl`

Name: An outlet
Definition: a property of an object that references another objectthat is saved in the nib file
Page: https://developer.apple.com/library/archive/documentation/General/Conceptual/CocoaEncyclopedia/Outlets/Outlets.html
Context: Objective-C

Instruction: - (id)init {
    self = [super init];
    if (self) {
        // initializeInstanceVariables
    }
    return self;
}
Page: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html
Effect: initialize the class with initializeInstanceVariables
Language: objective-C
Variables: C a class