Summary of common face questions for iOS development engineers
After my recent interview and some summary of the interview materials, prepare to record these questions, so that iOS development engineers looking for work review, I hope that the interview experience can be completed with me at the same time the module, the first Test, and then release the answer.
Can the 1.object-c class inherit multiple? Can I implement multiple interfaces? What is category? Is it better to rewrite a class in a way that inherits or classifies? Why?
2. What is the difference between #import and # include, @class, #import<> and #import "" What difference?
3. What are the functions of readwrite,readonly,assign,retain,copy,nonatomic, in that case?
What is the nature of the object declared by 4.id?
What is 5.MVC? What are the characteristics? Why is it widely used on the iphone?
6. For statements nsstring* testobject = [[NSData alloc] Init];testobject What types of objects are at compile time and run time respectively?
7. What is safe release?
8. Why some 4.0 unique OBJECTIVE-C functions will be error when running on 3.1. and 4.0 unique classes do not error when allocating memory on 3.1? What is the result of the assignment?
9. Why is the 4.0 unique C function running on a 3.1 machine without error (in the case of No call?). and 4.0 unique class names in 3.1 of the machine run on the error?
10. What are the common object-c data types, and what is the difference between the basic data types of C? such as: Nsinteger and int
What are the meanings of attribute Retain,copy,assgin in 11.property? What's the difference? How do I convert it into a Get/set method? What precautions do you have?
12. What is a delegate? What attributes are used for the property declaration of the delegate? Why?
13. What is the difference between a shallow copy and a deep copy? ...
What is the difference between 14.NSString and nsmutablestring?
15. What is the difference between an auto-release pool and a GC? Is there a GC on my iphone? What is the difference between [pool release] and [pool drain]?
16.
for (int index = 0; index <; index + +) {
NSString *tempstr = @ "TempStr";
NSLog (TEMPSTR);
NSNumber *tempnumber = [NSNumber numberwithint:2];
NSLog (Tempnumber);
}
What's wrong with this piece of code? Will it cause memory leaks (multithreading)? When doing cycle on a memory-tight device, does the automatic release of the pool be written in the loop or out of circulation? Why?
17. What are the several principles of memory management? Follow the default rules. Those keyword-generated objects need to be released manually? How to effectively avoid memory leaks when combined with property?
18. Before an object is released. If he was added to the Notificationcenter. Not in Notificationcenter what is the problem with this object?
19. How to implement a singleton class. Give the idea.
20. What is serialization or acrchiving, what can be done, how to combine with copy, and what is the principle?
21. What is a thread? What are the considerations.?
22. There are two things to do on the iphone, is it high efficiency in a line thread in order or two threads? Why?
What is 23.runloop? An asynchronous function is called in a function in the main thread, how to block the current thread, and can also respond to the current thread's timer events, touch events, and so on.
How does the 24.ios platform do data persistence? Is there any connection between CoreData and SQLite? is coredata a relational database?
25. Describe the lifetime of a nil object from interface Bulider to the time it takes to load the program's running space and finally be released.
is 26.notification synchronous or asynchronous? is KVO synchronous or asynchronous? is notification a notification of the whole process space? Where's kvo?
What is 27.KVC? What is KVO? What are the characteristics?
28. What is the responder chain?
29.unix on the process how to communicate?
is the 30.timer interval accurate? Why? How to achieve a precise timer?
What design patterns are used in the 31.UIscrollVew? Can you find something similar in the Foundation library?
32. If you want to develop an eclipse-like software, support the plug-in structure. and open to third-party development. How are you going to design it? (Approximate idea)
33. What are the differences and linkages between threads and processes?
How do 34.C and obj-c mix?
35. The number of retain count of the person object after each line of code is executed
Person *person = [[Person alloc] init]; Count 1
[Person retain]; Count 2
[Person release]; Count 1
[Person release]; Retain count = 1;
When did the 36.ViewController Loadview, Viewdidload, Viewdidunload, respectively, be called?
When was the didreceivememorywarning of 37.ViewController called?
What are the new features of 38.IOS5?
39. Tell me about your understanding and understanding of arc.
Summary of common face questions for iOS development engineers