Xcode8 Add Swift Auto layout snapkit frame error, compile failed

Source: Internet
Author: User

---restore content starts---

Since the author of Snapkit said that Snapkit has supported Swift3.0, then we first to adapt to Snapkit, first with Xcode8 new empty project, using Cocoapods import Snapkit.


Podfile

Open the project and still pop up this option:


Whether to convert to Swift3.0

Just choose Convert still error, visible not reliable, this time we all choose later.

After compiling, error:


Error

Error message we remain the "use Legacy Swift Language Version" option.
Let's take a look at how this option is set:


Set compilation options for Snapkit

Because Snapkit already supports Swift3.0, we choose No, not support the old Swift version, which uses the Swift3.0 syntax. Compiled by. Let's take a look at the compile options for the target that we wrote the code to generate:


Compile options for your own target


Because the Xcode8 new project uses the Swift3.0 syntax by default, the default selection here is No.

Compilation succeeded

Finally, copy the set Snapkit frame directly into your project and overwrite the original Snapkit in the project.

Note: This method is seen in Itnose, the original http://www.itnose.net/detail/6648171.html

Xcode8 Add Swift Auto layout snapkit frame error, compile failed

Related Article

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.