Question Finishing for iOS development

Source: Internet
Author: User
<span id="Label3"></p>1, the role of the category? What is the difference between inheritance and category in implementation?<p><p>Category can add new methods in the case of not knowing, not changing the original code, can only add, cannot delete the Modification. And if the category and methods in the original class produce name collisions, the category overrides the original method because the category has a higher Priority.</p></p><p><p>There are 3 main functions of the category:</p></p><p><p>(1) the implementation of the class is dispersed across several different files or multiple frameworks.</p></p><p><p>(2) Create a forward reference to the private method.</p></p><p><p>(3) Add an informal agreement to the Object.<br>Inheritance can add, modify, or delete methods, and can add Properties.</p></p>2, the difference between KVO and kvc?<p><p>Answer: kvc: Key-value Encoding is a mechanism that indirectly accesses an Object's properties by using a string to identify the property, rather than by invoking an access method, either directly or through an instance Variable.</p></p><p><p>In many cases, the program code can be Simplified. The Apple documentation actually gives a good example.</p></p><p><p>Kvo: a key-value observation mechanism that provides a way to observe a change in a property, greatly simplifying the Code.</p></p><p><p>In particular, to see that one of the places that I used to be is the monitoring of the button click Change state</p></p>3, the role of agents?<p><p>Answer: The purpose of the agent is to change or pass the control chain. Allows a class to be notified to other classes at certain times without having to get to those classes<br>Pointer. Can reduce the complexity of the Frame.</p></p><p><p>On the other hand, a proxy can be understood as a similarity to the callback listener mechanism in Java.</p></p>4. What are the differences between the notice and the agreement?<p><p>Answer: the protocol has a control chain (has-a) relationship, the notification is Not.</p></p><p><p>First of all I didn't quite understand, what is called the chain of control (professional terminology ~). But simple analysis of the notification and agent behavior patterns, we can roughly have their own understanding</p></p><p><p>In short, it can be a one-to-many message, and a message can be sent to multiple recipient Recipients.</p></p><p><p>Agent according to our understanding, to not directly say not a pair of more, such as we know the star economic agent, many times an economic person responsible for several star Affairs.</p></p><p><p>Just for different stars, agents of the objects are not the same, each corresponding, it is impossible to say tomorrow to deal with a star to a conference, the agent issued a message to deal with the conference, the nickname B<br>The Press Conference. But the notice is not the same, he only cares about giving notice, not caring how much receives interest to deal With.</p></p><p><p>So the control chain (has-a from English words can be seen roughly, a single ownership and controllable Correspondence.</p></p>What is 5.MVC? What are the characteristics? Why is it widely used on the iphone?<p><p>Answer: The MVC design pattern considers three types of objects: model objects, view objects, and controller Objects. Model objects represent special knowledge and expertise that are responsible for preserving the data of the application and the logic that defines the operational Data. The View object knows how to display the model data for the application and may allow the user to edit it. The Controller object is the coordinator between the Application's view object and the model Object.</p></p>6. What is the difference between a pointer and an address?<p><p>Difference:</p></p><p><p>The 1 pointer means that there is already a pointer variable present, his value is an address, and the pointer variable itself is stored in a four-byte address, and the address concept itself does not mean that there are any variables Present.</p></p><p><p>2 The value of the pointer, if there is no limit, is usually changeable, or it can point to a different address.</p></p><p><p>The address represents a point in memory space where he is assigned to the pointer, the address itself is no size concept, the pointer points to the size of the variable, depending on the type of variable stored behind the Address.</p></p>7. HTTP protocol Detailed<p><p>HTTP is an object-oriented protocol belonging to the application layer, which is suitable for distributed hypermedia information System because of its simple and fast way. Currently used in the WWW is the sixth edition of http/1.0, http/1.1 standardization work is in PROGRESS.</p></p><p><p>HTTP (hypertext transfer Protocol) is a request-and-response mode-based, stateless, application-level protocol, often based on TCP connection, HTTP1.1 version of a continuous connection mechanism, the vast majority of Web development, is built on the HTTP protocol on the Web Application.</p></p><p><p>The main features of the HTTP protocol can be summarized as follows:</p></p><pre><pre><code>1.支持客户/服务器模式。2.简单快速:客户向服务器请求服务时,只需传送请求方法和路径。请求方法常用的有GET、HEAD、POST。每种方法规定了客户与服务器联系的类型不同。由于HTTP协议简单,使得HTTP服务器的程序规模小,因而通信速度很快。3.灵活:HTTP允许传输任意类型的数据对象。正在传输的类型由Content-Type加以标记。4.无连接:无连接的含义是限制每次连接只处理一个请求。服务器处理完客户的请求,并收到客户的应答后,即断开连接。采用这种方式可以节省传输时间。5.无状态:HTTP协议是无状态协议。无状态是指协议对于事务处理没有记忆能力。缺少状态意味着如果后续处理需要前面的信息,则它必须重传,这样可能导致每次连接传送的数据量增大。另一方面,在服务器不需要先前信息时它的应答就较快。</code></pre></pre><p><p></p></p><p><p>Question Finishing for iOS development</p></p></span>

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.