in the Swift project, you want to add Objective-c library support at the same time or you need to program with Objective-c
Selecting the Objective-c system when adding a new file automatically generates a Xx-bridging-header.h file and then the. h file of the Objective-c file to be referenced in the SWIFT project#import "Xxxx.h"you can reference the methods in OC in the swift file.
If you do not generate the corresponding Bridging-header file when you add an OC file, you can manually add an. h file yourself, and then name Xxx-bridging-header.h, select Swift in the project build settings Complier, edit the contents of the Objective-c Bridge-header item to the newly added Bridging-header file, and note the file path. Generally: projectname/Projectname-bridging-header.h
Well, it's also possible to refer to the OC method in Swift.
Swift and Objective-c Hybrid programming