[iOS base Control-6.12.3] @property properties Strong weak copy

Source: Internet
Author: User
A. Conceptual @property modifiers strong: Strong pointers/strong references (IOS6 and previous retain) weak: Mentally retarded true/weak references (IOS6 and previous assign) by default all pointers are strong pointers using "__weak" The pointer to the trim is the weak pointer to the ARC rule: the object is destroyed as long as there is no strong pointer to it @property property usage * Weak (assign): Proxy \ui control
* Strong (Retain): Other objects (except proxy \ui control \ String objects)
* Copy: String * Assign: Non-object type (base data type int\float\bool\ enum \ struct) B.ui control's @property adornment: 1. Why the UI controls in the controller use the weak selection: Controller view Subviews has a strong pointer to the child control under view, there is no need to use the strong pointer 2. Why the delegate in the controller uses weak must: the View/tableview in the controller is pointing with a strong pointer,   The delegate in view cannot use a strong pointer to refer back to the controller! c.copy deep Copy Shallow copy

[iOS base Control-6.12.3] @property properties Strong weak copy

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.