Introduction: TMD T iOS senior development post third, the following record the memories of the interview for future review.
First, introduce yourself
Tell me a little bit about yourself
- What is your current job and what are the projects you have done
Ii. Oral questions derived from self-introduction
Tell me about any optimizations or technical difficulties you made on your project
- Off-topic: this kind of problem is best to find their own questions to talk about, not much, in advance to prepare a project you are very good at and familiar with the point, can.
Three, programming: to achieve the following functions
- Write a custom class, Person, whose parent is NSObject
- This class has two properties, external read-only properties
name
And one more propertyage
- Write an initialization method for the class
initWithName:(NSString *)nameStr
And initialize according to the method parametersname
Properties.
- Two Persons are considered equal if their names are equal
4. Oral questions derived from programming questions
- How to implement an externally read-only property so that it cannot be tampered with externally
- Nonatomic is a nonatomic operator. Why is that? Why not atomic? Some people say it can atomic memory consumption, what do you think? Is it read and write safe? Is it thread safe? Some people say that atomic is not thread-safe, what do you think their starting point is, do you agree with this statement?
- Why do you assign the parameter to _name in the initialization method, and why do you write it this way to access the sample variable of the property declaration?
- When was the _name generated in the initialization method? When allocating memory? Or is it initialization?
- Self as return is generated at the top, okay?
- Why and when do you use copy?
Fifth, the actual development issues discussed
-
What do you do to optimize memory? How to avoid memory hogs?
-
How do you achieve thread-safety? How are these thread-safe methods different from atomic ones? What is the implementation mechanism of Atomic
Six, the following words
The above is the recall version of the topic, readers can find their own answers to this.