iOS Development-Learning Runtime's understanding and experience

Source: Internet
Author: User
IOS: Learning Runtime's understanding and experience


Runtime wants to do a good job of iOS development, or really a deep grasp of the language of OC is necessary to understand the things. Recently in the study of runtime, have their own some experience, sorted as follows,

One for easy access

The second is perhaps to give others some inspiration,

Third, hope to get everyone to this article to tidy up some of the shortcomings of the guidance.

what is runtime

The code we write will be translated into runtime C code execution, such as [Target dosomething], and will be converted to Objc_msgsend (target, @selector (dosomething));.

Everything in the OC is designed to be an object, and we all know that a class is initialized to an instance of an object. In fact, a class is also an object in nature, represented by a struct in runtime.

Related definitions:

1 2 3 4 5 6 7 8 Describes a method in a class typedef struct OBJC_METHOD *method; Instance variable typedef struct OBJC_IVAR *ivar; Category category typedef struct Objc_category *category; The properties declared in the class typedef struct OBJC_PROPERTY *objc_property_t;

The representation of classes in runtime

1 2 3 4 5 6 7 8 9 10 11 12 13-14

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.