Haha yes, you're right. I misunderstanded your idea, sorry. Indeed, in
Obj-C, we have the freedom to decide on whether or not assign a value to
a property by invoking setter or by accessing ivar directly and Apple's
official documentation apparently suggested that we should always access
the
On 30 Jan 2017, at 10:12, Torin Kwok wrote:
> In Obj-C, if a property has promised that it conforms to
> porotocl and that it would respect copying semantic by being qualified
> with `@property (copy)`, then we assign a value to `ivar` through the
> setter by writting down
On 27 Jan 2017, at 18:56, Jordan Rose via swift-users
wrote:
> @NSCopying currently does not affect initializers. … it's not 100%, for-sure
> a bug.
Just by way of context, this current behaviour closely matches Objective-C
conventions, where `-init` methods directly
Hi Torin,
Just a few notes:
I believe the @NSCopying behaviour actually uses the copy(with zone: NSZone?)
method rather than the indirect copy() method. I would check that you’ve
implemented that correctly. If you have, then it appears to be a bug. I would
breakpoint on this method (not
Hello guys,
I wanna ask a question about the behavior of `@NSCopying` semantic in
Swift 3. Well, according to Apple's official documentation:
> In Swift, the Objective-C copy property attribute translates to
> @NSCopying. The type of the property must conform to the NSCopying
> protocol.