My Github address
Notes on data Structures and Algorithms
Notes for geek Time iOS Developer Class
IOS large factory interview high frequency algorithm summary
Summary of iOS interview materials
classification
What do you do with classification?
- Declare private methods
- Decompose large class files
- Expose the Framework’s private methods
Second, the characteristics of classification
- Runtime resolution
- You can add categories to system classes
Three, classification can be added to what content?
- Instance methods
- Class method
- agreement
- attribute
Four, classified source code interpretation
- This section of notes is the same as the Category mentioned by Junior brother, and junior brother’s class is more detailed, so here is a direct link to junior brother’s Category notes.
Day 5: Category
associations
Can I add “member variable” to the classification?
- You can add member variables to a classification using the “associative object” technique.
Two, associated object source code
Day 7: Associate objects
extension
What do extensions do in general?
- Declare a private property
- Declare private methods
- Declare private member variables
Ii. The difference between classification and extension?
classification
isRuntime resolution
.extension
isCompile-time resolution
.- Classifications can be declared and implemented. Extensions exist only as declarations, mostly in the.m of the host class.
- You can add categories to system classes, but not extensions to system classes.
The agent
- A piece of software, to be exact
Design patterns
. - Among the iOS to
@protocol
Form manifests. - Delivery mode one to one.
How to avoid circular reference?
notice
- Is the use of
Observer model
To implement a mechanism for sending messages across layers. - The transmission mode is
More than a pair of
.
How to implement notification mechanism?
- Global dictionary
Notification_Map
In order tonotificationName
forkey
To the arrayObservers_List
forvalue
. Observers_List
Save all statements the samenotificationName
The object.- Object to
Observer
The form of preservation, which includesFunction executed
.object
Itself, etc.
KVO
Day 4: The essence of KVO
KVC
Day 5: The essence of KVC
Attribute keyword
- Read and write access
- readonly
- readwrite
- atomic
- atomic
- nonatomic
- Reference counting
- retain/strong
- assign/unsafe_unretained
- weak
- copy
Are atomic thread-safe?
atomic
Modify the object that the system will apply to itset
,get
Function to lock.- if
atomic
Decorates an array, then assigns to the arrayset
And access toget
It can be guaranteedThread safety
. - If I take an array
Add elements
andRemove elements
Operation, is notatomic
Within the operating range of, yesThread insecurity
.
Atomic
Ii. What is the difference between assign and weak?
- assign
- Modifies basic data types, such as
int
,bool
And so on. - When an object type is modified, its reference count does not change.
- It produces a dangling pointer.
- Modifies basic data types, such as
- weak
- Does not change the reference count of the back modifier object.
- The object is automatically set to when it is released
nil
.
The difference between shallow copy and deep copy?
Day 25: OC object memory management
Objective-c interview summary
- How to override setter methods for retain decorates variables under MRC?
- Please briefly describe the implementation principle of classification.
- How does KVO work?
- Can I add a member variable to a classification?