You can write a Swift extension and use it in Objective-C code. Tested with Xcode 6.1.1.
All you need to do is:
-
create your extension in Swift (
@objc
annotation needed since Swift 4.0.3) -
#import "ProjectTarget-Swift.h"
in your Objective-C class (where “ProjectTarget” represents the XCode target the Swift extension is associated with) -
call the methods from the Swift extension