Swift and OC hybrid compilation, swiftoc
I recently studied swift and would like to use swift in previous OC Projects
At the beginning, it was relatively fast to get started. Below are some simple pitfalls recorded.
1. due to some swfit tutorials, I plan to use swift in the existing OC. According to the tutorial, there is no problem, but I cannot compile swift in the original OC,
When an error was reported at the beginning, the system prompts that different types could not be found. Later, it was discovered that swfit code could not be used in the oc code in the same project, and OC could be used in the swift code, similar to the endless loop
Compile the project name-swift. h.
2. Do I need to add the main types of OC in the conversion method !, Otherwise, errors are often reported.
3. When using swift to use xib, there will always be an inexplicable ns1_nil error. No reason is found yet, and there will be more when using scrollview. Record the reason for Future Search