In the property declaration it is possible to send the “copy” attribute. You can not use copy for all objects, but for which objects is it possible to use the copy attribute?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
-copyis not an attribute, it is a method. It’s OK to send-copyto any object that implements the NSCopying protocol.If you have a property, you can (should?) use the
copyattribute if the property’s type is a class that implementsNSCopying. i.e. any class that it is OK to send-copyto.