Warning: Be sure to put the English topic over again, some of the company's topics deliberately made into English!!!
Difference between shallow copy and deep copy?
1> Shallow copy: pointer (address) Copy, does not produce new objects
2> deep Copy: A copy of the content that produces a new object
Advantage of categories? What is difference between implementing a category and inheritance?
1> classification can be based on the original class model without modification of the extension method
2> classification can only expand methods, cannot expand member variables; Inheritance can extend methods and member variables
3> inheritance will produce new classes
Difference between categories and extensions??
The 1> category is named, and the class extension does not have a name
2> classification can only extend the method, cannot expand the member variable, the class extension may extend the method and the member variable
3> class extensions are generally written in. m files, which are used to augment private methods and member variables (attributes)
Difference between protocol in Objective C and interfaces in Java??
The methods declared in the 1> Java interface must all be implemented
The method declared in the protocol of 2> OC is not necessarily implemented
What is KVO and KVC?
1> KVC is a key-value encoding that modifies the object's property value by a string key (property name)
2> Kvo is a key-value listener that can listen for changes to an object's property value
What is purpose of delegates??
1> passing data and messages between two objects
2> decoupling, splitting of business logic
What is mutable and immutable types in Objective C??
1> mutable is a mutable type, such as Nsmutablearray, which dynamically adds elements to it.
2> immutable are immutable types, such as Nsarray, fixed storage space, cannot add elements
When do we call Objective C are runtime language what does it mean??
1> Dynamic Binding: Object types are really determined at run time
2> polymorphism
3> message mechanism
What is difference between nsnotification and protocol??
1> can pass data and messages to multiple objects via nsnotification
2> can only pass data and messages to an object via protocol (proxy mode)
What is push notification??
1> local push: Pop-up notifications inside the program to the user device
2> remote push: Push notifications to user devices by push server
What is polymorphism??
Polymorphic: Parent class pointer to child class object
What is Singleton??
Single grain: Guarantees that the program will always run with only one instance of the object
The goal is to share a single resource globally, saving unnecessary memory overhead
What is responder chain??
? Responder chain:
L Uiresponder has a nextresponder property that can be used to form a responder chain, where an event or message is passed on its path
L if Uiresponder does not handle the event passed to it, it forwards the unhandled message to its own nextresponder
difference between frame and bounds??
1> frame with the upper-left corner of the parent control as the origin of the coordinates
2> bounds with the upper left corner of the control itself as the origin of the coordinates
Difference between method and selector??
A method address can be found through a selector, which in turn calls a method
Bayi. Is there any garbage collection mechanism in Objective C.??
1> OC 1.0 No garbage collection
2> OC 2.0 is garbage collected and can only be used on Mac
3> iOS has an arc mechanism, which is compiler feature, garbage collection is a runtime feature
Nsoperation queue??
1> the queue used to hold Nsoperation objects, which can be used to perform some operations asynchronously
2> can typically be used in time-consuming operations such as network requests
What is the lazy loading??
Lazy loading: For example, the view of the controller, the Loadview method is called when the view is first used to create
Can we use the TableView controllers on one viewcontroller?
From a technical point of view, it is no problem to add 2 table controllers inside a controller
Can we use one tableview with different datasources? How you'll achieve this???
Parsing from object properties, TableView has only one DataSource property. Of course, you really need to use 2 different data sources, or there are other ways to solve the
iOS face question Daquan 66-85