Category: Swift

Allocate Swift objects from Objective-C

Using mixed projects you can face with several challenging situations. One of them is the allocation of Swift objects in ObjC code. The general problem that Swift objects doesn’t have an alloc method which is used to allocate the memory in ObjC ([[SwiftClass alloc] init]). To access the Swift object you should prefix it with @objc – or subclass […]