OBJECT-C Runtime Programming Guide Learning Notes

Source: Internet
Author: User
Messaging sends a message to an instance, and the runtime uses the Objc_msgsend function to send it. Each class has a pointer to his super class, with a dispatch table that points to the address of each method.  Each instance (from NSObject or nsproxy) has a pointer to Isa, which points to his class. Runtime goes back up until it finds the method that was called and then executes. Two hidden parameters are passed in the executed method Self:message Receiver_cmd: The selector of the current method

dynamically add a method Resolveinstancemethod can dynamically add instance methods, Resolveclassmethod can dynamically add class methods dynamically load nsbundle message forwarding If Forwardinvocation is implemented, this interface is called when the object sends a message that does not exist, where it can be forwarded to other objects for processing.

OBJECT-C Runtime Programming Guide Learning Notes

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.