Bridging objective-c to swift.


First, you have to make “YourProjectName-Bridging-Header.h” file.

when you add Objective-c file, XCode will ask you to make Bridging-Header file automatically.
but if you added Bridging-Header file manually,
you have to modify Objective-c Bridging Header in Swift Compiler - General in Build Settings in your project.

In “YourProjectName-Bridging-Header.h” file…

//
//  Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "Your Objective-c class name.h"

Then just import your Objective-c class where you want to use in swift file.