Reference Link: http://blog.csdn.net/huangchentao/article/details/35278663
1. Establishment of an OC project (Mixtureocandswift)
2. Create a class of OC (OcTest)
3. Created a swift class (swifttest) when creating this class, Xcode prompts you to create a mixtureocandswift-bridging-header.h file, select Create
4. If you want to use Swifttest in Octest:
?4.1-> in Mixtureocandswift-bridging-header.h add #import "OcTest.h" (this must be added, otherwise, the following report to find the wrong header file)
???4.2-> add Mixtureocandswift-swift.h to the OCTEST.M (if there is no previous step, there will be no warning and error)
???4.3-> can now use Swifttest directly in the octest.
5. If you want to use Octest in Swifttest
? ? ? 5.1-> add #import "OcTest.h" in Mixtureocandswift-bridging-header.h (4.1 has been added, so this can be omitted)
? ? ? 5.2-> can now use Octest directly in the swifttest.
Hybrid programming of Swift and OC