iOS Development--Interview written essence (ii)

Source: Internet
Author: User

Interview written essence (ii)

Warning: Be sure to put the English topic over again, some of the company's topics deliberately made into English!!!

1. Difference between shallow copy and deep copy?

The 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

2. What is advantage of categories? What is difference between implementing a category and inheritance?

The role of the category? What is the difference between inheritance and category in implementation?

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

3. Difference between categories and extensions??

What are the differences between categories and class 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)

4. Difference between protocol in Objective C and interfaces in Java??

What is the difference between a protocol in OC and an interface concept 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

5. 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

6. What is purpose of delegates??

The role of the agent?

1> passing data and messages between two objects

2> decoupling, splitting of business logic

7. What is mutable and immutable types in Objective C??

Can I modify and not modify the type in OC?

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

8. When do we call Objective C are runtime language what does it mean??

What do we mean by the Dynamic runtime language of OC?

1> Dynamic Binding: Object types are really determined at run time

2> polymorphism

9. What is difference between nsnotification and protocol??

Differences between notifications and agreements

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??

What is a push message?

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??

About polymorphism?

Polymorphic: Parent class pointer to child class object

What is Singleton??

For the understanding of the singleton

Single example: Guarantee that the program will always run with only one object instance

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??

What is the 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??

What is the difference between a method and a selector?

A method address can be found through a selector, which in turn calls a method

Add: Selector is the name of a method, which is a combination that contains the name and implementation.

There any garbage collection mechanism in Objective C.??

OC's garbage collection mechanism?

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

What is 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 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?

are two TableView controllers embedded in a single view controller?

From a technical point of view, it is no problem to add 2 table controllers inside a controller

Can we use the one tableview with the different datasources? How you'll achieve this???

Can a tableview be associated with two different data sources? What would you do with it?

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 Development--Interview written essence (ii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.