The need to pay attention to the knowledge points in swift and OC

Source: Internet
Author: User

Swift Oc

*swift has a namespace concept, so-called namespaces that can be called from one another in the same namespace without importing. The same name can be used in different namespaces

The SWIFT project is a namespace

* Determine if a class, protocol, method

* Runtime gets the class attribute list, the property name, the C-language string to OC string

* Basic data type, not selectable in OC, if defined as optional in swift, run-time is also not available, the use of KVC crashes, so the basic data type needs to be assigned an initial value

The *private property, which uses the runtime, also gets the property, which also causes KVC to crash

* Run-time run-time execution method

Objects in *oc are exposed at run time by all property methods and are available through the run-time method

The need to pay attention to the knowledge points in swift and OC

Related Article

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.