Swift and OC hybrid compilation, swiftoc

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.