Bridging Swift to Objective-c.


import Foundation

@objc class Printer: NSObject {

    func doPrint() {
        print("PRINT!")
    }

}

“@objc” and “NSObject” is the key point.

#import "YourProjectName-Swift.h"

Add import to Objective-c file, then you can use Swift in Objective-c.