IOS Advanced 22nd Day (0603)

Source: Internet
Author: User
0603 block\ Runtime block

The nature of a block is a pointer to a struct.

Run-time

To parse the C + + code that the clang command compiles, it is necessary to delete some of the parentheses to analyze it. Because these parentheses are generally type-strong.

OC Bottom runtime is a method that sends a message to an object by objec_msgsend this message distribution mechanism to invoke the specified methods. such as:

I have used the runtime to write code, as in the following example:

1. Assign values to the member variables of an object through the runtime's underlying code, such as:

2. Expand member variables by category

It is not possible to expand member variables in the original category, but you can extend the member variables by using the run-time method, such as:

Reflection in C #, you can get an object that contains the name and type of a member variable and how it can be called. This can be done in the runtime runtime of the OC, as shown in the following:

block, some of the explanations below must be noted

IOS Advanced 22nd Day (0603)

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.