Reading List

NSCopying in a Swift World from Michael Tsai RSS feed.

NSCopying in a Swift World

Douglas Hill: This crash happens because, behind the scenes, the Swift compiler synthesises overrides of a superclass’s designated initialisers. These overridden initialisers crash to prevent objects from being incorrectly initialised from Objective-C. […] From a quick look on Stack Overflow, it seems [self.class alloc] is often a recommended way to create a copy in Objective-C. […]