1.
2.
The above modifies a configuration item that has a product Module name that will be used later.
In the project, click File/new/file ..., select Ios/source/cocoa Touch Class, and create a new file as follows:
Subclass of must be set to NSObject or its subclasses, otherwise OC works will not find the class.
Click on the confirmation will choose to save the path, click Create, the following interface appears:
This interface is asking whether to create a bridged header file, which is useful when Swift calls the OC code, but when I invoke Swift in OC I find that there are no eggs.
3, and then create a "project name"-swift.h file, although this file is useless, but still need to set up a bit. Easy to add this header file in the back of the controller after the addition of this file can be deleted, because the system has built an identical hidden file, you only need to import.
4. Then, you add the SWIFT project you need to the project. Here your project should be able to successfully invoke Swift, you can click "Project name"-swift.h This header file to see if there is content, similar if there is a description you have succeeded. Next you'll want to use the OC syntax as well.
As long as the above steps do not necessarily implement OC invoke Swift. If you have any questions, please correct them! Zpengs
OC calls Swift finishing steps! Summarize other people's! Easy to find yourself!