---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