In swift you want to invoke a custom OC class or open source package, just do the next bridge, create a file with the project name-bridging-header.h file, the. h file can import the file you want like OC, and then in the build Settings objective-c bridging header, where its value is, fill in the header file you created yourself.
1. You can drag the corresponding header file into the input box of the fill value
2. Manually fill in the header file path into the input box, such as: jokermost/swift-objectivec-bridge.h
In fact, # define can also be implemented in this area.
In Swift development, a new subclass of Uicollectionviewcell was created: Exhibitioncell, "No such module ' Cocoa ' ERROR:
The reason is simple: when you create a new file, you select the "OS X" project, and you should select the "IOS" project. So delete the error file and re-create a new file, the problem is solved. Reference