IOS KVC Detailed explanation

Source: Internet
Author: User
IOS KVC Detailed explanation

What is KVC?

KVC is nskeyvaluecoding, which is the meaning of key-value coding. An informal Protocol 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.

The above is KVC theory, interview, truthfully answer can!

Using KVC Instructions
  • When KVC indirectly modifies an object's properties, it automatically determines the type of the object's properties, completing the corresponding conversion.
  • KVC when a key value path is taken, if the object does not contain the specified key value, it is automatically entered inside the object to find the object properties.
  • KVC can be nested according to the value of the key-value path.
What's the difference between KVC and KVO?

On an article we talked about iOS Kvo overview, interested can see. During the interview, the interviewer asked: What is the difference between KVC and KVO?

Hear this question really very (Dan) ache, Akzent want to return a sentence, how do I know what difference? Of course, if you answer like this, the interview is expected to end.

What is the difference between KVC and KVO?

KVO is built on KVC, KVO can observe the change of the KVC Key-path value of an object.

The source of this article just online: http://www.superqq.com/blog/2015/06/06/ios-kvcxiang-xi-jiang-jie/

IOS KVC Detailed explanation

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.