iOS English complex questions

Source: Internet
Author: User

1, 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, 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)

3, 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

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

5. What is purpose of delegates??

1> passing data and messages between two objects

2> decoupling, splitting of business logic

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

7, when we call Objective C is the runtime language what does it mean??

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

2> polymorphism

3> message mechanism

8. 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)

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

10. What is polymorphism??

Polymorphic: Parent class pointer to child class object

11. What is Singleton??

Single-row: guarantee 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

12. What is responder chain??

? Responder chain:

Uiresponder has a Nextresponder property that can be used to form a responder chain, where an event or message is passed on its path

If Uiresponder does not handle the event passed to it, it forwards the unhandled message to its own nextresponder

13, 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

14, difference between method and selector??

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

15, 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

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

17, 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

18, 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

19, Can We use one tableview with the 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 English complex questions

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.